import { useState, HTMLProps } from 'react'; import { CopyIcon, CheckIcon } from '@primer/octicons-react'; import { cn } from '~/utils/cn'; import { toast } from '~/components/Toaster'; interface Props extends HTMLProps { isCopyable?: boolean; } export default function Code(props: Props) { const [isCopied, setIsCopied] = useState(false); return ( <> {props.children} {props.isCopyable && props.children ? ( ) : undefined} ); }