diff --git a/src/routes/docs/+page.svelte b/src/routes/docs/+page.svelte index 7426cb1..886d059 100644 --- a/src/routes/docs/+page.svelte +++ b/src/routes/docs/+page.svelte @@ -3,9 +3,10 @@ import iconAdd from "@ktibow/iconset-material-symbols/add"; import iconPalette from "@ktibow/iconset-material-symbols/palette-outline"; import iconType from "@ktibow/iconset-material-symbols/font-download-outline"; - import { base } from "$app/paths"; import Icon from "$lib/misc/_icon.svelte"; import ButtonLink from "$lib/buttons/ButtonLink.svelte"; + import { base } from "$app/paths"; + import Snippet from "./Snippet.svelte"; @@ -53,10 +54,12 @@ it from +layout.svelte or wherever your app is mounted)

Then, add something like this:

-
body {
+      
+}`}
+      />
     
   
   
  • @@ -69,35 +72,45 @@

    Add class="m3-font-body-large" to your <body>.

    Make sure M3 Svelte can use your font

    Using Roboto? Add this to your app.html:

    -
    <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" />
    + `} + />

    Not? Set your font like this:

    -
    body {
    +      
    +}`}
    +      />
         
       
  • Use a component

    -

    Just import a component to start using it. For example:

    -
    <script>
    -  import { Button } from "m3-svelte";
    -</script>
    +

    Just import a component to start using it. For example:

    + + import { Button } from "m3-svelte"; +<\/script> -<Button type="filled" on:click={() => alert("Hello world!")}>Hello world!</Button>
    + + + +
    {code}
    + + +