import clsx from 'clsx'; import { Button } from '@@/buttons'; import { useCopy } from '@@/buttons/CopyButton/useCopy'; import styles from './Code.module.css'; interface Props { showCopyButton?: boolean; children: string; } export function Code({ children, showCopyButton }: Props) { const { handleCopy, copiedSuccessfully } = useCopy(children); return (
{children}
{showCopyButton && (
)}