UNPKG

svelte-theme-select

Version:

Customizable Svelte components for theme selection (light mode / dark mode) inspired by TailwindCSS. Flicker-free, synchronizes across tabs, works with or without SSR and doesn't require unnecessary use of `transformPageChunk` so is cache-friendly.

13 lines (12 loc) 401 B
import type { Snippet } from 'svelte'; import { Theme } from './state.svelte'; interface Props { selectLabel?: string; selectButton?: string; selectIcon?: string; labels?: Record<Theme, string>; icons?: Snippet<[Theme, boolean]>; } declare const ThemeSelect: import("svelte").Component<Props, {}, "">; type ThemeSelect = ReturnType<typeof ThemeSelect>; export default ThemeSelect;