Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button: Update types to be a conditional proptype (or a union in TS) of if hasIconOnly, kind !== "danger" #17036

Closed
Tracked by #14300
tay1orjones opened this issue Jul 24, 2024 · 1 comment · Fixed by #17272

Comments

@tay1orjones
Copy link
Member

tay1orjones commented Jul 24, 2024

danger is not a valid type of IconButton or <Button hasIconOnly/>, we need to update the proptypes and TS interfaces to state this.

@tay1orjones tay1orjones changed the title Update Button types to be a conditional proptype (or a union in TS) of if hasIconOnly, kind !== "danger" Button: Update types to be a conditional proptype (or a union in TS) of if hasIconOnly, kind !== "danger" Jul 24, 2024
@tay1orjones tay1orjones moved this to ⏱ Backlog in Design System Jul 24, 2024
@tay1orjones tay1orjones added this to the 2024 Q3 milestone Jul 24, 2024
@Gururajj77
Copy link
Contributor

This article could give more insight on this issue:
https://typeofnan.dev/conditional-component-props-react/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants