Skip to content

Commit

Permalink
Minor doc edit for Drawer, Modal, Toast instruction
Browse files Browse the repository at this point in the history
  • Loading branch information
endigo9740 committed Aug 9, 2023
1 parent 0907f39 commit 2eea63b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,14 @@
</div>
</svelte:fragment>
<svelte:fragment slot="source">
<p>Implement a single instance of the drawer component in your app's root layout above the App Shell (if present).</p>
<!-- prettier-ignore -->
<p>
Implement the following in the root layout of your application. This is required only once when implementing Skeleton's Drawer, Modal, or Toast features, and will prevent known issues with <a class="anchor" href="https://github.com/skeletonlabs/skeleton/wiki/SvelteKit-SSR-Warning" target="_blank">SvelteKit SSR</a>.
</p>
<CodeBlock language="ts" code={`import { initializeStores } from '@skeletonlabs/skeleton';\n\ninitializeStores();`} />
<p>Implement a single instance of the drawer component in your app's root layout, above the App Shell (if present).</p>
<CodeBlock language="html" code={`<Drawer />\n\n<!-- <AppShell>...</AppShell> -->`} />
<p>We'll cover triggering this feature on-demand in the documentation below.</p>
</svelte:fragment>
</DocsPreview>
</svelte:fragment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,10 @@
<button class="btn variant-filled" on:click={modalDemo}>Show Modal</button>
</svelte:fragment>
<svelte:fragment slot="source">
<p>In your app's root layout, import the Modal component and the store initializer function.</p>
<!-- prettier-ignore -->
<p>
Implement the following in the root layout of your application. This is required only once when implementing Skeleton's Drawer, Modal, or Toast features, and will prevent known issues with <a class="anchor" href="https://github.com/skeletonlabs/skeleton/wiki/SvelteKit-SSR-Warning" target="_blank">SvelteKit SSR</a>.
</p>
<CodeBlock
language="typescript"
code={`
Expand All @@ -158,15 +161,9 @@ import { Modal, initializeStores } from "@skeletonlabs/skeleton";
initializeStores();
`}
/>
<p>Add a single instance of the Modal component above the App Shell (if present).</p>
<CodeBlock
language="html"
code={`
<Modal />
<!-- <AppShell>...</AppShell> -->
`}
/>
<p>Implement a single instance of the modal component in your app's root layout, above the App Shell (if present).</p>
<CodeBlock language="html" code={`<Modal />\n\n<!-- <AppShell>...</AppShell> -->`} />
<p>We'll cover triggering this feature on-demand in the documentation below.</p>
</svelte:fragment>
</DocsPreview>
</svelte:fragment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,14 @@
</div>
</svelte:fragment>
<svelte:fragment slot="source">
<!-- prettier-ignore -->
<p>
Import and add a single instance of the Toast component in your app's root layout. Since this is in global scope it will be
possible to reuse this feature throughout your entire application.
Implement the following in the root layout of your application. This is required only once when implementing Skeleton's Drawer, Modal, or Toast features, and will prevent known issues with <a class="anchor" href="https://github.com/skeletonlabs/skeleton/wiki/SvelteKit-SSR-Warning" target="_blank">SvelteKit SSR</a>.
</p>
<CodeBlock language="ts" code={`import { initializeStores } from '@skeletonlabs/skeleton';\n\ninitializeStores();`} />
<CodeBlock language="html" code={`<Toast />`} />
<p>Implement a single instance of the toast component in your app's root layout, above the App Shell (if present).</p>
<CodeBlock language="html" code={`<Toast />\n\n<!-- <AppShell>...</AppShell> -->`} />
<p>We'll cover triggering this feature on-demand in the documentation below.</p>
</svelte:fragment>
</DocsPreview>
</svelte:fragment>
Expand Down

0 comments on commit 2eea63b

Please sign in to comment.