chore: Move Theme to GlobalTheme

The reason for this is that Theme is a new v11 component that allows for inline theming. That’s a different purpose than this component has. In the standard Carbon implementation a GlobalTheme is used that matches the purpose of what this Svelte component used to do. The idea is to stick to the same name as the standard implementation.
This commit is contained in:
Gregor Wassmann 2023-03-24 21:49:11 +01:00
commit c0ff8ff76a
12 changed files with 9 additions and 9 deletions

View file

@ -0,0 +1,24 @@
<script lang="ts">
import { Theme } from "../types";
import type { CarbonTheme } from "../types/Theme/Theme.svelte";
let theme: CarbonTheme = "g10";
</script>
<Theme
bind:theme
persist
persistKey="carbon-theme"
on:update="{(e) => console.log(e.detail.theme)}"
tokens="{{ 'button-primary': 'violet' }}"
render="toggle"
toggle="{{
themes: ['g10', 'g90'],
labelA: '',
labelB: '',
}}"
select="{{
themes: ['g10', 'g90'],
labelText: '',
}}"
/>