MCPcopy Create free account
hub / github.com/dailydotdev/apps / stateEntries

Function stateEntries

packages/shared/tailwind/buttonTheme.ts:27–36  ·  view source on GitHub ↗
(states: StateBlock)

Source from the content-addressed store, hash-verified

25}
26
27const stateEntries = (states: StateBlock): Array<[string, string]> =>
28 (Object.keys(states) as Array<keyof StateBlock>).flatMap((state) => {
29 const props = states[state];
30 if (!props) {
31 return [];
32 }
33 return Object.keys(props)
34 .filter((prop) => props[prop] !== undefined)
35 .map((prop): [string, string] => [`${state}-${prop}`, props[prop]!]);
36 });
37
38/**
39 * Emits the theme-aware `--{varPrefix}-{state}-{prop}` tokens of every

Callers 1

buttonThemeStylesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected