From ee7c0a798082a4cddb109b0482a6131104dc1e35 Mon Sep 17 00:00:00 2001 From: cchaos Date: Mon, 27 Jun 2022 11:56:33 -0400 Subject: [PATCH] Cleanup and CL --- src/components/button/button.tsx | 4 +--- .../button_group/_button_group_button.scss | 15 --------------- upcoming_changelogs/5989.md | 16 ++++++++++++++++ 3 files changed, 17 insertions(+), 18 deletions(-) create mode 100644 upcoming_changelogs/5989.md diff --git a/src/components/button/button.tsx b/src/components/button/button.tsx index c0f92d5e071..50307eb83c6 100644 --- a/src/components/button/button.tsx +++ b/src/components/button/button.tsx @@ -205,7 +205,7 @@ export const EuiButtonDisplayDeprecated = forwardRef< }, ref ) => { - const buttonIsDisabled = isLoading || isDisabled; + const buttonIsDisabled = isButtonDisabled({ isLoading, isDisabled }); const classes = classNames( baseClassName, @@ -215,9 +215,7 @@ export const EuiButtonDisplayDeprecated = forwardRef< size && sizeToClassNameMap[size] ? `${baseClassName}${sizeToClassNameMap[size]}` : null, - // fill && `${baseClassName}--fill`, fullWidth && `${baseClassName}--fullWidth`, - // buttonIsDisabled && `${baseClassName}-isDisabled`, className ); diff --git a/src/components/button/button_group/_button_group_button.scss b/src/components/button/button_group/_button_group_button.scss index 012087a6e8a..7766a298735 100644 --- a/src/components/button/button_group/_button_group_button.scss +++ b/src/components/button/button_group/_button_group_button.scss @@ -89,21 +89,6 @@ } } - // // Fix ghost/disabled look specifically - // .euiButtonGroupButton.euiButtonGroupButton-isDisabled.euiButtonGroupButton--ghost { - // &, - // &:hover, - // &:focus, - // &:focus-within { - // color: $euiButtonColorGhostDisabled; - // } - - // &.euiButtonGroupButton-isSelected { - // background-color: $euiButtonColorGhostDisabled; - // color: makeHighContrastColor($euiButtonColorGhostDisabled, $euiButtonColorGhostDisabled, 2); - // } - // } - .euiButtonGroupButton-isSelected { z-index: 0; } diff --git a/upcoming_changelogs/5989.md b/upcoming_changelogs/5989.md new file mode 100644 index 00000000000..15491681885 --- /dev/null +++ b/upcoming_changelogs/5989.md @@ -0,0 +1,16 @@ +- Updated button `ghost` colors to be `colorMode = 'dark'` themed `text` buttons +- Renamed `ButtonColor` and `ButtonSize` types to prefixed versions `EuiButtonColor` and `EuiButtonSize` + +**Deprecations** + +- Deprecated `ghost` color for `EuiButton`, `EuiButtonIcon`, `EuiButtonEmpty` + +**Breaking changes** + +- Removed `EuiButtonIconColor` and `EuiButtonEmptyColor` types, use `EuiButtonIconProps['color']` and `EuiButtonEmptyProps['color']` instead +- Removed support for `ghost` color from `EuiButtonGroup` + +**CSS-in-JS** + +- Converted `EuiButton` to Emotion +- Converted color styles of `EuiButtonIcon`, `EuiButtonEmpty`, `EuiButtonGroup`