sinclairnick/brail

Variants: Add Variant API to Brail theming

sinclairnick opened this issue · 0 comments

Theming doesn't allow for variants yet, which makes templating less ergonomic.

On the other hand, we don't want to take on too much complexity, since Brail React is meant to be more of an HTML email engine or set of primitives, than a full-on component library solution.

Requirements:

  • Allow multiple variants to be assigned
  • Variants should be assigned via the variant="..." property
  • The variant prop can be either a string (singular variant), or array of strings (variant composition)
  • Variants are defined at the Component-level in the Styled function, not at the theme level, to ensure the strict prop types are maintained.