mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
docs: add initial recipes
This commit is contained in:
parent
964a0c9f75
commit
249f158f8a
9 changed files with 271 additions and 4 deletions
15
docs/src/pages/recipes/CopyableCodeSnippet.svx
Normal file
15
docs/src/pages/recipes/CopyableCodeSnippet.svx
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
layout: recipe
|
||||
---
|
||||
|
||||
<script>
|
||||
import Preview from "../../components/Preview.svelte";
|
||||
</script>
|
||||
|
||||
The [CodeSnippet](/components/CodeSnippet) and [CopyButton](/components/CopyButton) do not include logic to copy the supplied `code` text.
|
||||
|
||||
## clipboard-copy
|
||||
|
||||
This example uses [clipboard-copy](https://www.npmjs.com/package/clipboard-copy), a lightweight module designed for the web.
|
||||
|
||||
<FileSource src="/framed/CopyableCodeSnippet/CopyableCodeSnippet" />
|
Loading…
Add table
Add a link
Reference in a new issue