docs: add svelte:head example for loading CDN styles

This commit is contained in:
Eric Y Liu 2021-07-23 08:45:55 -07:00
commit 47d82fdd9a

View file

@ -40,6 +40,12 @@
/>
</head>
</html>`;
$: cssCdnSvelteHead = `<svelte:head>
<link
rel="stylesheet"
href="https://unpkg.com/carbon-components-svelte/css/${$theme}.css"
/>
</svelte:head>`;
</script>
<Content>
@ -144,10 +150,8 @@
unpkg.com
</OutboundLink>.
</p>
<p>
This is best suited for rapid prototyping or if your set-up does
not use a CSS loader.
</p>
<p>This is best suited for rapid prototyping.</p>
<h5>HTML</h5>
<Row padding noGutter>
<Column>
<p>
@ -155,6 +159,14 @@
</p>
</Column>
</Row>
<h5>svelte:head</h5>
<Row padding noGutter>
<Column>
<p>
<CodeSnippet type="multi" code="{cssCdnSvelteHead}" />
</p>
</Column>
</Row>
</TabContent>
<TabContent>
<p>