feat(copy-button): add copy functionality

This commit is contained in:
Eric Y Liu 2021-04-01 14:36:52 -07:00
commit ce53706e17
8 changed files with 50 additions and 24 deletions

View file

@ -8,6 +8,11 @@ export interface CopyButtonProps extends CopyProps {
* @default "Copy to clipboard"
*/
iconDescription?: string;
/**
* Specify the text to copy
*/
text?: string;
}
export default class CopyButton extends SvelteComponentTyped<
@ -15,6 +20,7 @@ export default class CopyButton extends SvelteComponentTyped<
{
click: WindowEventMap["click"];
animationend: WindowEventMap["animationend"];
copy: CustomEvent<any>;
},
{}
> {}