defaults
defaults: SettingsEffect-native UI toolkit
Interactive demosPublished API · 0.1.0-rc.1
Published themes API declarations for components/theme.
@wsagency/wseffect-themes · MIT · source · MIT license · WS-AGENCY-NOTICE
This entry point is published in @wsagency/wseffect-themes@0.1.0-rc.1. Import it from the package subpath shown below; the signatures and documentation are read from the installed package declarations.
import * as Wseffect from '@wsagency/wseffect-themes/components/theme'defaultsdefaults: SettingsSettingsexport type Settings = typeof Settings.Type;SettingsSettings: Schema.Struct<{
readonly accentColor: Schema.Literals<readonly ["gray", "gold", "bronze", "brown", "yellow", "amber", "orange", "tomato", "red", "ruby", "crimson", "pink", "plum", "purple", "violet", "iris", "indigo", "blue", "cyan", "teal", "jade", "green", "grass", "lime", "mint", "sky", "custom"]>;
readonly grayColor: Schema.Literals<readonly ["auto", "gray", "mauve", "slate", "sage", "olive", "sand"]>;
readonly radius: Schema.Literals<readonly ["none", "small", "medium", "large", "full"]>;
readonly scaling: Schema.Literals<readonly ["90%", "95%", "100%", "105%", "110%"]>;
readonly appearance: Schema.Literals<readonly ["inherit", "light", "dark"]>;
readonly panelBackground: Schema.Literals<readonly ["solid", "translucent"]>;
readonly hasBackground: Schema.Boolean;
}>viewview: <Message>({ settings, isRoot, id }: ViewProps, children: ReadonlyArray<Html | string>, h: HtmlBuilder<Message>) => HtmlViewPropsexport type ViewProps = Readonly<{
settings: Partial<Settings>;
isRoot: boolean;
id?: string;
}>;import * as Themes from '@wsagency/wseffect-themes'
import * as SliderRange from '@wsagency/wseffect-themes/components/slider/range'
import * as Option from 'effect/Option'
import { defineView } from '@wsagency/wseffect-foldkit/submodel'
import { inertHtml, type HtmlBuilder } from '@wsagency/wseffect-foldkit/html'
const example = (h: HtmlBuilder<unknown>) => Themes.Theme.view({ settings: { appearance: 'light' }, isRoot: false }, ['Theme-aware content'], h)