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