storybook/docs/_snippets/storybook-preview-head-example.md
2024-06-13 17:53:08 +01:00

18 lines
561 B
Markdown

```html renderer="common" language="ts" tabTitle="html"
{/* .storybook/preview-head.html */}
{/* Pull in static files served from your Static directory or the internet */}
{/* Example: `main.js|ts` is configured with staticDirs: ['../public'] and your font is located in the `fonts` directory inside your `public` directory */}
<link rel="preload" href="/fonts/my-font.woff2" />
{/* Or you can load custom head-tag JavaScript: */}
<script src="https://use.typekit.net/xxxyyy.js"></script>
<script>
try {
Typekit.load();
} catch (e) {}
</script>
```