-
-
Notifications
You must be signed in to change notification settings - Fork 264
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
This error has appeared several times now: #253, #300, #303
Component props should be typed as the intersection of the semantic element props and props exported from the component.
Furthermore, potentially adding { [key: string]: any; }
can serve as a catch-all for custom component attributes. A common use case would be data-{X}
selectors used for testing/analytics.
For example, the following should not throw a TS error:
<Link data-test style="color: red;" href="#">Link</Link>
The data-test
and style
attributes are not explicitly defined in the Link component, but they should still be valid.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working