|
5 | 5 | let code = `import "carbon-components-svelte/css/all.css";`; |
6 | 6 | </script> |
7 | 7 |
|
8 | | -The `Theme` component can dyanmically update the Carbon theme on the client-side. It can persist the theme locally using [window.localStorage](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage). |
| 8 | +The `GlobalTheme` component can dyanmically update the Carbon theme on the client-side. It can persist the theme locally using [window.localStorage](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage). |
9 | 9 |
|
10 | 10 | <InlineNotification svx-ignore lowContrast title="Note:" kind="info" hideCloseButton> |
11 | | - <div class="body-short-01">You must use the "all.css" StyleSheet with the <code>Theme</code> component.</div> |
| 11 | + <div class="body-short-01">You must use the "all.css" StyleSheet with the <code>GlobalTheme</code> component.</div> |
12 | 12 | </InlineNotification> |
13 | 13 |
|
14 | 14 | The `all.css` StyleSheet uses [CSS variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties) for dynamic theming. |
15 | | - |
| 15 | + |
16 | 16 | <CodeSnippet svx-ignore {code} /> |
17 | 17 |
|
18 | 18 | ## Default |
19 | 19 |
|
20 | | -<FileSource src="/framed/Theme/Theme" /> |
| 20 | +<FileSource src="/framed/GlobalTheme/GlobalTheme" /> |
21 | 21 |
|
22 | 22 | ## Persist locally |
23 | 23 |
|
24 | 24 | Set `persist` to `true` to persist the theme locally using the [Window.localStorage API](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage). |
25 | 25 |
|
26 | | -<FileSource src="/framed/Theme/ThemePersist" /> |
| 26 | +<FileSource src="/framed/GlobalTheme/GlobalThemePersist" /> |
27 | 27 |
|
28 | 28 | ## Custom theme |
29 | 29 |
|
30 | 30 | 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. |
31 | 31 |
|
32 | | -<FileSource src="/framed/Theme/ThemeTokens" /> |
| 32 | +<FileSource src="/framed/GlobalTheme/GlobalThemeTokens" /> |
33 | 33 |
|
34 | 34 | ## Theme toggle |
35 | 35 |
|
36 | 36 | Set `render` to `"toggle"` to render a toggle switch to control the theme. |
37 | 37 |
|
38 | | -<FileSource src="/framed/Theme/ThemeToggle" /> |
| 38 | +<FileSource src="/framed/GlobalTheme/GlobalThemeToggle" /> |
39 | 39 |
|
40 | 40 | ## Theme toggle (custom) |
41 | 41 |
|
42 | 42 | Customize the toggle using the `toggle` prop. |
43 | 43 |
|
44 | | -<FileSource src="/framed/Theme/ThemeToggleCustom" /> |
| 44 | +<FileSource src="/framed/GlobalTheme/GlobalThemeToggleCustom" /> |
45 | 45 |
|
46 | 46 | ## Theme select |
47 | 47 |
|
48 | 48 | Set `render` to `"select"` to render a select dropdown to control the theme. |
49 | 49 |
|
50 | | -<FileSource src="/framed/Theme/ThemeSelect" /> |
| 50 | +<FileSource src="/framed/GlobalTheme/GlobalThemeSelect" /> |
51 | 51 |
|
52 | 52 | ## Theme select (custom) |
53 | 53 |
|
54 | 54 | Customize the select using the `select` prop. |
55 | 55 |
|
56 | | -<FileSource src="/framed/Theme/ThemeSelectCustom" /> |
| 56 | +<FileSource src="/framed/GlobalTheme/GlobalThemeSelectCustom" /> |
0 commit comments