Genesis
@beta

validateAppTheme

Every problem with an app theme input; empty when it is sound.

packages/ui/src/themes/define.ts

Import
Subpath export: @marktiderman/genesis-ui
import { 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.

PropTypeDefaultDescription
description*string—
label*string—Its name in a picker.
name*string—Lowercase letters, digits and hyphens.
brandAppBrand—Colours and typefaces. Unset keeps the app's own brand.
feelstring—The kind of product whose feel it follows, in words ("keyboard-first issue trackers").
layoutAppThemeLayout—The shell's layout. Unset keeps the app's own `AppShell` options.
styleAppStyle—Every component's size and shape. Unset keeps Genesis's default style.
suitsreadonly 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.

PropTypeDefaultDescription
description*string—
label*string—Its name in a picker.
name*string—Lowercase letters, digits and hyphens.
brandAppBrand—Colours and typefaces. Unset keeps the app's own brand.
feelstring—The kind of product whose feel it follows, in words ("keyboard-first issue trackers").
layoutAppThemeLayout—The shell's layout. Unset keeps the app's own `AppShell` options.
styleAppStyle—Every component's size and shape. Unset keeps Genesis's default style.
suitsreadonly 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.

PropTypeDefaultDescription
description*string—
id*string—
label*string—Its name in a picker.
name*string—Lowercase letters, digits and hyphens.
brandAppBrand—Colours and typefaces. Unset keeps the app's own brand.
feelstring—The kind of product whose feel it follows, in words ("keyboard-first issue trackers").
layoutAppThemeLayout—The shell's layout. Unset keeps the app's own `AppShell` options.
styleAppStyle—Every component's size and shape. Unset keeps Genesis's default style.
suitsreadonly string[]—The work it suits, for a picker or a zone map ("issues", "tasks", "journal").