group
import { group } from "@pitlane/theme/schema";function group<self, children>(self, children): children & object;A node that is itself typed and also carries per-child overrides.
self applies to that node and to every descendant without its own
entry; each key in children overrides it from there down.
The self schema rides on a symbol key, so no token name is reserved:
a token named default can carry its own type.
Type Parameters
self
self extends TokenSchema<SchemaTag>
The schema for this node and its unlabelled descendants
children
children extends Record<string, SchemaNode>
Per-child schema overrides
Parameters
self
self
children
children
Returns
children & object
A schema group
Example
let schema = {
control: s.group(s.dimension(), { color: s.color(), opacity: s.number() }),
};
// control.height.sm is a dimension; control.color.border is a color.