Fix component gallery layout (#888)
This commit is contained in:
@@ -25,18 +25,19 @@ export default function CodeBox(props: CodeBoxProps) {
|
||||
<summary class="text-center cursor-pointer bg-gray-50 select-none text-gray-600 hover:text-gray-800 hover:bg-gray-100 py-2 rounded-b">
|
||||
Code
|
||||
</summary>
|
||||
<code class="relative">
|
||||
<pre
|
||||
class="bg-gray-800 text-blue-300 p-2 text-sm rounded whitespace-pre-wrap"
|
||||
dangerouslySetInnerHTML={{ __html: highlighted }}
|
||||
/>
|
||||
<div class="relative">
|
||||
<pre class="bg-gray-800 text-blue-300 p-2 text-sm rounded whitespace-pre-wrap">
|
||||
<code
|
||||
dangerouslySetInnerHTML={{ __html: highlighted }}
|
||||
/>
|
||||
</pre>
|
||||
<button
|
||||
onClick={onCopy}
|
||||
class="absolute top-2 right-2 px-3 py-2 border border-gray-400 rounded text-white"
|
||||
class="absolute top-2 right-2 px-3 py-2 border border-gray-400 rounded text-white bg-gray-800"
|
||||
>
|
||||
{copied ? "Copied!" : "Copy"}
|
||||
</button>
|
||||
</code>
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user