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

CloseButtonProps size type conflicts with inherited ButtonProps type #821

Open
bmansell opened this issue May 29, 2020 · 1 comment
Open
Assignees

Comments

@bmansell
Copy link
Contributor

CloseButton uses its size prop to control the Close icon's size. This is a problem because CloseButtonProps extends ButtonProps which defines size as a specific string set so the resulting type is a mix of specific strings or a number.

size?: 'small' | 'medium' | 'large' | number

We should refactor CloseButton's size prop to be more specific like iconSize so that these types don't have to be collapsed into one.

@craigpalermo
Copy link
Collaborator

Discussion notes: We can rename size for Icon in IconButton to iconSize, which will be the same prop type as size on the Icon component.

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

Successfully merging a pull request may close this issue.

3 participants