Skip to content

Restrict props types #17

@jgoux

Description

@jgoux

Hello,

When using styled I noticed that all the possible html props types are available on the component created which hid the variant in a very long list.

I think the whole point of styled is to restrict the set of the possible native props + providing our variants.

Is there a way to restrict the component's props to its variants + a specific subset (or no subset at all) of the possible other native props for the specific component used as the first argument?

For example I defined a Text component using styled("span", { /* some variants */ }) and here is what I have as possible props (a very long list ^^) :
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions