You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 :
Type 'ButtonColor' is not assignable to type '"accent" | "danger" | "ghost" | "primary" | "subdued" | "success" | "text" | "warning" | undefined'.
Type '"secondary"' is not assignable to type '"accent" | "danger" | "ghost" | "primary" | "subdued" | "success" | "text" | "warning" | undefined'.ts(2322)
button_icon.tsx(81, 3): The expected type comes from property 'color' which is declared here on type 'IntrinsicAttributes & PropsWithChildren<(DisambiguateSet<OuiButtonIconPropsForAnchor, OuiButtonIconPropsForButton> & ... 4 more ... & { ...; }) | (DisambiguateSet<...> & ... 4 more ... & { ...; })>'
(property) color: "accent" | "danger" | "ghost" | "primary" | "success" | "text" | "warning"
Host/Environment (please complete the following information):
OUI Version: [e.g. 1.0]
OSD Version (if applicable): [e.g. 2.7.0]
OS: [e.g. iOS]
Browser and version [e.g. Chrome 90]
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
* **`subdued` set to be DEPRECATED, use `text` instead**
*/
color?: OuiButtonIconColor;
You can move color={color} after the property spread, or (better) define type for propsForDropdownButton as something like propsForDropdownButton?: Omit<OuiButtonProps, 'color'>;
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: