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) • 403 B
TypeScript
import type { Snippet } from 'svelte';
import { Theme } from './state.svelte';
interface Props {
dropdownList?: string;
dropdownHover?: string;
textActive?: string;
labels?: Record<Theme, string>;
icons?: Snippet<[Theme, boolean]>;
}
declare const ThemeToggle: import("svelte").Component<Props, {}, "">;
type ThemeToggle = ReturnType<typeof ThemeToggle>;
export default ThemeToggle;