docs(theme): add description, update carbon theme link [ci skip]

This commit is contained in:
Eric Y Liu 2021-07-10 15:42:09 -07:00
commit 7457edf60d
6 changed files with 19 additions and 14 deletions

View file

@ -11591,7 +11591,7 @@
{
"name": "tokens",
"kind": "let",
"description": "Customize a theme with your own tokens\nhttps://carbondesignsystem.com/guidelines/themes/overview#tokens",
"description": "Customize a theme with your own tokens\nhttps://carbondesignsystem.com/guidelines/themes/overview#customizing-a-theme",
"type": "{ [token: string]: any; }",
"value": "{}",
"isFunction": false,

View file

@ -105,7 +105,10 @@
{:else if type.startsWith("(")}
<code>{type}</code>
{:else}
<InlineSnippet code="{type}" />
<InlineSnippet
code="{type}"
style="white-space: pre-wrap"
/>
{/if}
</div>
{/each}

View file

@ -3,6 +3,8 @@
import Preview from "../../components/Preview.svelte";
</script>
This utility component dynamically updates the Carbon theme on the client-side using CSS variables.
### Default
<FileSource src="/framed/Theme/Theme" />
@ -15,7 +17,7 @@ Set `persist` to `true` to persist the theme locally using the [Window.localStor
### Custom theme
Define keys and values in the `tokens` prop that override default Carbon theme tokens.
Define keys and values in the `tokens` prop that override default Carbon theme tokens. Refer to the [Carbon website](https://carbondesignsystem.com/guidelines/themes/overview#customizing-a-theme) for guidance on customizing a theme using token values.
<FileSource src="/framed/Theme/ThemeTokens" />