Files
lucide/site/src/components/CopyButton.tsx
T
Eric Fennis d6f65516ad Add documentation Section to lucide.dev (#479)
* Add docs Menu Tree data

* Start with sectiontitles

* Create link list

* Add Docs menu to mobile

* Add some more pages and text

* Optimize text

* add license to the menu

* update packages

* Fix build

* Update title

* Remove ModifiedTooltip

* Fix assets

* add yarn to copy-assets command

* update lockfile
2022-02-01 19:26:07 +01:00

14 lines
347 B
TypeScript

import { Box, ButtonProps, Button, useClipboard } from '@chakra-ui/react';
const CopyButton = ({ copyText, buttonText = 'copy', ...props }) => {
const { hasCopied, onCopy } = useClipboard(copyText);
return (
<Button onClick={onCopy} {...props}>
{hasCopied ? 'copied' : buttonText}
</Button>
);
};
export default CopyButton;