diff --git a/docs/src/lib/components/Code.svelte b/docs/src/lib/components/Code.svelte index 29d95bd5e..e8a8bdbf2 100644 --- a/docs/src/lib/components/Code.svelte +++ b/docs/src/lib/components/Code.svelte @@ -15,12 +15,14 @@ interface Props { source?: string | null; language?: string; + includeCopyButton?: boolean; classes?: { root?: string; pre?: string; code?: string }; } let { source = null, language = 'svelte', + includeCopyButton = true, classes = {}, class: className }: Props & HTMLAttributes = $props(); @@ -55,13 +57,15 @@ -
- -
+ {#if includeCopyButton} +
+ +
+ {/if} {/if} diff --git a/docs/src/lib/components/TabbedCode.svelte b/docs/src/lib/components/TabbedCode.svelte new file mode 100644 index 000000000..25737e8b5 --- /dev/null +++ b/docs/src/lib/components/TabbedCode.svelte @@ -0,0 +1,42 @@ + + +
+ + + + + +
+ + diff --git a/docs/src/routes/docs/getting-started/+page.md b/docs/src/routes/docs/getting-started/+page.md index a57f5767e..845777071 100644 --- a/docs/src/routes/docs/getting-started/+page.md +++ b/docs/src/routes/docs/getting-started/+page.md @@ -1,6 +1,7 @@ # Getting Started @@ -73,15 +130,11 @@ or checkout out the **standlone** {@render githubButton('standalone')} {@render ## Manual setup -To manually setup LayerChart in a new project (such as one ceated with [sv create](https://svelte.dev/docs/cli/sv-create)) or in an existing project. +To manually setup LayerChart in a new project (such as one created with [sv create](https://svelte.dev/docs/cli/sv-create)) or in an existing project. First import `layerchart` with your package manager of choice: -```sh -npm install layerchart -# or -pnpm install layerchart -``` + then import the components from `layerchart`: @@ -110,31 +163,7 @@ Out of the box LayerChart will use `currentColor` as the default color, but you LayerChart [provides](https://github.com/techniq/layerchart/tree/next/packages/layerchart/src/lib/styles) `.css` files for popular frameworks to simplify the setup with a single import -### daisyUI - -```css -@import 'layerchart/daisyui-5.css'; -``` - -### shadcn-svelte - -```css -@import 'layerchart/shadcn-svelte.css'; -``` - -### Skeleton - -#### v3 - -```css -@import 'layerchart/skeleton-3.css'; -``` - -#### v4 - -```css -@import 'layerchart/skeleton-4.css'; -``` + {#snippet githubButton(path, text = 'Source')}