Skip to content

registerVariant ​

Overview ​

Registers a new variant for a component with the given name.

Signature ​

registerVariant(componentName, variantName, variantConfig)

Parameters ​

NameTypeRequiredDescription
componentNamestringyesThe name of a registered component.
variantNamestringyesThe name of the variant.
variantConfigVariantConfigyesCSS classes keyed by spot name. Each spot must be one the component declares.

Returns ​

void

Throws ​

  • If the variant configuration is invalid.

Source ​

client/lib/stores/storeTheme.js:110