Skip to content

@graphty/graphty-element / catalog / LABEL_STYLE_FIELDS

Variable: LABEL_STYLE_FIELDS ​

const LABEL_STYLE_FIELDS: readonly keyof LabelStyle[]

Defined in: graphty-element/src/catalog/label-style.ts:196

Every field LabelStyle publishes, as a list something can iterate.

A SETTINGS PANEL AND A STORY CONTROL BOTH NEED THIS, and the only alternative is each of them restating the field names -- which is how the Storybook controls came to offer seven fields long after the vocabulary had more. The object below is satisfies Record<keyof LabelStyle, 0> rather than a hand-written array, so adding a field to the interface without adding it here fails to compile, and naming one that is not on the interface fails too.