-
Notifications
You must be signed in to change notification settings - Fork 69
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
[BUG] ButtonColor, OuiButtonIconColor typedef conflict #1196
Comments
it's because of oui/src/components/button/button.tsx Line 105 in 59edc96
You have
the type is
which can contain color?: ButtonColor oui/src/components/button/button.tsx Lines 95 to 105 in 59edc96
it can't be used for color in OuiButtonIcon because that component expects OuiButtonIconColor .oui/src/components/button/button_icon/button_icon.tsx Lines 75 to 81 in 59edc96
You can move Edit: add more details |
@joshuali925 @pjfitzgibbons Want to PR a fix? |
Describe the bug
ButtonColor, OuiButtonIconColor have nearly overlapping definitions :
ButtonColor == Omit<OuiButtonIconColor, 'subdued'>
OuiButtonIconColor == Omit<ButtonColor, 'success'>
This mismatch though causes typedef conflict and failure of
tsc --noEmit
when a single color var is used to style sibling OuiButton and OuiButtonIcon.See (#1193, split_button_control.tsx:113)
Expected behavior
A single unified color type that can be used between Button and ButtonIcon
Screenshots
Typescript language server in VSCode produces :
Host/Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: