mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 19:46:36 +00:00
feat(code-snippet): add copy functionality
- docs: add custom feedback copy text example
This commit is contained in:
parent
f13e3b100e
commit
50b93c8a17
15 changed files with 91 additions and 94 deletions
2
types/CodeSnippet/CodeSnippet.d.ts
vendored
2
types/CodeSnippet/CodeSnippet.d.ts
vendored
|
@ -11,6 +11,7 @@ export interface CodeSnippetProps {
|
|||
/**
|
||||
* Set the code snippet text
|
||||
* Alternatively, use the default slot (e.g., <CodeSnippet>{`code`}</CodeSnippet>)
|
||||
* You must use the `code` prop to copy the code
|
||||
*/
|
||||
code?: string;
|
||||
|
||||
|
@ -115,6 +116,7 @@ export default class CodeSnippet extends SvelteComponentTyped<
|
|||
mouseenter: WindowEventMap["mouseenter"];
|
||||
mouseleave: WindowEventMap["mouseleave"];
|
||||
animationend: WindowEventMap["animationend"];
|
||||
copy: CustomEvent<any>;
|
||||
},
|
||||
{ default: {} }
|
||||
> {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue