Message
export type Message = {
_tag: 'SettingsChanged';
settings: Partial<ThemeSettings>;
};Effect-native UI toolkit
Interactive demosPublished API · 0.1.0-rc.1
Published themes API declarations for components/theme-panel.
@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-panel'Messageexport type Message = {
_tag: 'SettingsChanged';
settings: Partial<ThemeSettings>;
};PropsProps: Schema.Struct<{
readonly isOpen: Schema.Boolean;
readonly settings: Schema.Struct<{
readonly accentColor: Schema.optional<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.optional<Schema.Literals<readonly ["auto", "gray", "mauve", "slate", "sage", "olive", "sand"]>>;
readonly radius: Schema.optional<Schema.Literals<readonly ["none", "small", "medium", "large", "full"]>>;
readonly scaling: Schema.optional<Schema.Literals<readonly ["90%", "95%", "100%", "105%", "110%"]>>;
readonly appearance: Schema.optional<Schema.Literals<readonly ["inherit", "light", "dark"]>>;
readonly panelBackground: Schema.optional<Schema.Literals<readonly ["solid", "translucent"]>>;
readonly hasBackground: Schema.optional<Schema.Boolean>;
}>;
}>ThemeSettingsexport type ThemeSettings = typeof Theme.Settings.Type;viewview: <M>(props: ViewProps, _children: ReadonlyArray<Html | string>, h: HtmlBuilder<M | Message>) => HtmlViewPropsexport type ViewProps = typeof Props.Type & Readonly<{
toSettingsChanged(settings: Partial<ThemeSettings>): Message;
}>;| Name | Type | Required | Choices | Description |
|---|---|---|---|---|
isOpen | boolean | Yes | — | — |
settings | { accentColor?: "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"; grayColor?: "auto" | "gray" | "mauve" | "slate" | "sage" | "olive" | "sand"; radius?: "none" | "small" | "medium" | "large" | "full"; scaling?: "90%" | "95%" | "100%" | "105%" | "110%"; appearance?: "inherit" | "light" | "dark"; panelBackground?: "solid" | "translucent"; hasBackground?: boolean } | Yes | — | — |
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.ThemePanel.view({ isOpen: true, settings: { appearance: 'light', accentColor: 'blue' }, toSettingsChanged: (settings) => ({ _tag: 'SettingsChanged', settings }) }, [], h)