diff --git a/docs/src/pages/components/CodeSnippet.svx b/docs/src/pages/components/CodeSnippet.svx index 42f237f3..e952a2ac 100644 --- a/docs/src/pages/components/CodeSnippet.svx +++ b/docs/src/pages/components/CodeSnippet.svx @@ -60,6 +60,18 @@ To prevent text from being copied entirely, pass a no-op function to the `copy` +### Expanded by default + +Use the `expanded` prop to control whether the multi-line code snippet is expanded or not. + + + +### Reactive example + +The multi-line code snippet also dispatches "expand" and "collapse" events. + + + ### Custom copy feedback text Use the `feedback` prop to override the default copy button feedback text. @@ -68,6 +80,8 @@ Use the `feedback` prop to override the default copy button feedback text. ### Hidden copy button +Set `hideCopyButton` to `true` to hide the copy button. + ### Disabled diff --git a/docs/src/pages/framed/CodeSnippet/CodeSnippetReactive.svelte b/docs/src/pages/framed/CodeSnippet/CodeSnippetReactive.svelte new file mode 100644 index 00000000..0d307c9e --- /dev/null +++ b/docs/src/pages/framed/CodeSnippet/CodeSnippetReactive.svelte @@ -0,0 +1,19 @@ + + + + +