Mixins / foldkit-mixins/theme

ThemesOf

interface · packages/mixins/src/theme/themes.ts:50

interface Themes<Name extends string> {
  readonly Name: Schema.Literals<ReadonlyArray<Name>>
  readonly names: ReadonlyArray<Name>
  readonly initial: Name
  readonly attribute: string
  readonly theme: (name: Name) => KnobTheme<Standard>
  readonly root: StandardTokens
  readonly scoped: StyleValue
}

A set of named themes, one of them shown until the Model chooses another.

Members

ThemesOf.Name

property · packages/mixins/src/theme/themes.ts:52

readonly Name: Schema.Literals<ReadonlyArray<Name>>

The names, as a Schema for the Model field that holds the active one.

ThemesOf.names

property · packages/mixins/src/theme/themes.ts:53

readonly names: ReadonlyArray<Name>

ThemesOf.initial

property · packages/mixins/src/theme/themes.ts:54

readonly initial: Name

ThemesOf.attribute

property · packages/mixins/src/theme/themes.ts:56

readonly attribute: string

The root element's attribute that names the active theme.

ThemesOf.theme

property · packages/mixins/src/theme/themes.ts:57

readonly theme: (name: Name) => KnobTheme<Standard>

ThemesOf.root

property · packages/mixins/src/theme/themes.ts:59

readonly root: StandardTokens

Every token with the initial theme's knobs: what the root declares, and what t reads.

ThemesOf.scoped

property · packages/mixins/src/theme/themes.ts:61

readonly scoped: StyleValue

Each other theme's knobs, under its attribute on the root element, for the theme layer.