mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-16 14:18:29 +00:00
* 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
14 lines
347 B
TypeScript
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;
|