components

This commit is contained in:
jorgemike
2025-03-22 14:25:11 -06:00
parent e5f007044a
commit 3d5f888dcb
4 changed files with 246 additions and 60 deletions
+13
View File
@@ -0,0 +1,13 @@
export const CodeBlock = ({ code }: { code: string }) => (
<div className="position-relative">
<pre className="bg-dark text-white p-3 rounded overflow-auto mb-0">
<code>{code}</code>
</pre>
<button
className="btn btn-sm btn-light position-absolute top-0 end-0 m-2"
onClick={() => navigator.clipboard.writeText(code)}
>
Copiar
</button>
</div>
);