Skip to content
This repository was archived by the owner on Dec 26, 2023. It is now read-only.
This repository was archived by the owner on Dec 26, 2023. It is now read-only.

Variants: Add Variant API to Brail theming #25

@sinclairnick

Description

@sinclairnick

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions