Skip to content

Commit d349e4c

Browse files
committed
docs: add switch
1 parent abb1796 commit d349e4c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docs/src/routes/+layout.svelte

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
SvelLink,
1111
SvelMain,
1212
SvelRow,
13+
SvelSwitch,
1314
} from '@svelement-ui/all';
14-
import { Github, SvelIcon } from '@svelement-ui/icon';
15+
import { Github, SvelIcon, Sunny, Moon } from '@svelement-ui/icon';
1516
import { setContext } from 'svelte';
1617
import { writable } from 'svelte/store';
1718
import { default as zh } from '$lib/i18n/zh/index.js';
@@ -45,6 +46,10 @@
4546
<SvelLink href="{PUBLIC_BASE_PATH}component" type="primary" underline={false}>
4647
Component
4748
</SvelLink>
49+
<SvelSwitch>
50+
<Sunny slot="inactiveActionIcon" />
51+
<Moon slot="activeActionIcon" />
52+
</SvelSwitch>
4853
<SvelButton class="ml-2" on:click={handleLang} text type="primary">
4954
{langString}
5055
</SvelButton>

0 commit comments

Comments
 (0)