Icons.byAttribute
function · packages/mixins-ui/src/icons.ts:25
function byAttribute(
attribute: string,
icons: Readonly<Record<string, string>>,
): StyleValueSets --icon by an attribute's value: each value its own icon.
Mixins / foldkit-mixins-ui
namespace · packages/mixins-ui/src/icons.ts:7
export * as Icons from './icons.js'Attribute-dispatched mask icons: mechanisms, not components. An element
shows the icon its attribute names, drawn from --icon over the text's
color. Where an icon comes from (a data URI, a file) is the application's:
pass resolved url(…) strings. No slots, no views.
Icons.byAttributefunction · packages/mixins-ui/src/icons.ts:25
function byAttribute(
attribute: string,
icons: Readonly<Record<string, string>>,
): StyleValueSets --icon by an attribute's value: each value its own icon.
Icons.glyphfunction · packages/mixins-ui/src/icons.ts:13
function glyph(size: string): StyleValueDraws the icon in --icon before the element's words, in their color.
Icons.tokensfunction · packages/mixins-ui/src/icons.ts:41
function tokens(
pack: {
readonly [Name in ChromeIcon]: IconData
},
stroke?: Stroke,
): {
readonly icon: {
readonly [Name in ChromeIcon]: string
}
}A pack of the icons the components draw themselves, as tokens to pass with
an application's own (AppStyle.make({ theme, tokens: Icons.tokens(pack) })):
each icon's mask, its strokes redrawn first when stroke asks. A pack
missing one the components draw is a type error.