import { Check, Copy } from 'lucide-react'; import { Button } from '@@/buttons'; import { useCopy } from '@@/buttons/CopyButton/useCopy'; import { Icon } from '@@/Icon'; 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 && ( )}
); }