function Example() {
const [value, setValue] = React.useState('https://blok.sitecore.com')
const { hasCopied, onCopy } = useClipboard(value)
return (
<FormControl>
<FormLabel>Share link</FormLabel>
<InputGroup>
<Input isReadOnly value={value} />
<InputRightElement>
<Tooltip label={hasCopied ? 'Copied' : 'Copy to clipboard'} closeOnClick={false}>
<IconButton
onClick={onCopy}
variant="ghost"
icon={
<Icon>
<path d={mdiContentCopy} />
</Icon>
}
size="sm"
aria-label={'Copy to clipboard'}
/>
</Tooltip>
</InputRightElement>
</InputGroup>
</FormControl>
)
}