mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 19:46:36 +00:00
feat(copy-button): add copy functionality
This commit is contained in:
parent
acfa5c2a17
commit
ce53706e17
8 changed files with 50 additions and 24 deletions
6
types/CopyButton/CopyButton.d.ts
vendored
6
types/CopyButton/CopyButton.d.ts
vendored
|
@ -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>;
|
||||
},
|
||||
{}
|
||||
> {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue