validateAppTheme
Every problem with an app theme input; empty when it is sound.
packages/ui/src/themes/define.ts
Import
Subpath export:
@marktiderman/genesis-uiimport { validateAppTheme } from "@marktiderman/genesis-ui";Components
Auto-generated from TypeScript source via
react-docgen-typescript.validateAppTheme
Every problem with an app theme input; empty when it is sound.
| Prop | Type | Default | Description |
|---|---|---|---|
| description* | string | — | |
| label* | string | — | Its name in a picker. |
| name* | string | — | Lowercase letters, digits and hyphens. |
| brand | AppBrand | — | Colours and typefaces. Unset keeps the app's own brand. |
| feel | string | — | The kind of product whose feel it follows, in words ("keyboard-first issue trackers"). |
| layout | AppThemeLayout | — | The shell's layout. Unset keeps the app's own `AppShell` options. |
| style | AppStyle | — | Every component's size and shape. Unset keeps Genesis's default style. |
| suits | readonly string[] | — | The work it suits, for a picker or a zone map ("issues", "tasks", "journal"). |
defineAppTheme
Define an app theme (a brand, a style and a layout, each optional): checks it and returns it frozen, with its id. Throws with every problem when it isn't sound.
| Prop | Type | Default | Description |
|---|---|---|---|
| description* | string | — | |
| label* | string | — | Its name in a picker. |
| name* | string | — | Lowercase letters, digits and hyphens. |
| brand | AppBrand | — | Colours and typefaces. Unset keeps the app's own brand. |
| feel | string | — | The kind of product whose feel it follows, in words ("keyboard-first issue trackers"). |
| layout | AppThemeLayout | — | The shell's layout. Unset keeps the app's own `AppShell` options. |
| style | AppStyle | — | Every component's size and shape. Unset keeps Genesis's default style. |
| suits | readonly string[] | — | The work it suits, for a picker or a zone map ("issues", "tasks", "journal"). |
appThemeAttributes
The attributes that put a theme's brand and style on an element: spread on `<html>` (or set them there in an effect) so portalled menus and dialogs wear it too. A piece the theme leaves unset gets no attribute, so the app's own stands.
| Prop | Type | Default | Description |
|---|---|---|---|
| description* | string | — | |
| id* | string | — | |
| label* | string | — | Its name in a picker. |
| name* | string | — | Lowercase letters, digits and hyphens. |
| brand | AppBrand | — | Colours and typefaces. Unset keeps the app's own brand. |
| feel | string | — | The kind of product whose feel it follows, in words ("keyboard-first issue trackers"). |
| layout | AppThemeLayout | — | The shell's layout. Unset keeps the app's own `AppShell` options. |
| style | AppStyle | — | Every component's size and shape. Unset keeps Genesis's default style. |
| suits | readonly string[] | — | The work it suits, for a picker or a zone map ("issues", "tasks", "journal"). |