import { ComponentProps, useMemo } from 'react'; import { Clipboard, IconButton } from "@chakra-ui/react" import {safeStringify} from '../../core/StringUtils'; export const ChakraClip = (props: Omit, 'children' | 'value'> & {value: any}) => { const { value, ...rest } = props; const clipVal = useMemo(() => { if(typeof value === 'string') { return value; } return safeStringify(value); },[value]) return ( ) }