Skip to content

compound variant in action for function component #4

@kEND

Description

@kEND

I've been following the docs and been unable to get a compound variant to work. It seems that there may be a level missing or, more likely, I'm complete misunderstanding them.

Any examples you can point to would be great.

Here's what we're doing. We've defined an intent variant on button/1 with several values, e.g. primary, secondary, etc. We've defined a color variant. Our app has two main areas and we differentiate them, in part, based on color.

So, I want a primary red button, I can do <.button intent="primary" color="red" ... My understanding of a compound variant would allow us to specify primary_red in some manner to include classes from both intent="primary" and color="red".

How do we indicate in the instance of the function component that we want a compound variant?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions