Skip to content

Commit

Permalink
fix(Button): fix btnTextHoverBg var (#3403)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhzz committed Apr 15, 2024
1 parent 71a2d06 commit 0801972
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
6 changes: 6 additions & 0 deletions packages/react-ui/components/Button/Button.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,12 @@ export const styles = memoizeStyle({
`;
},

textDisabled2022() {
return css`
background-color: transparent;
`;
},

loading() {
return css`
position: absolute;
Expand Down
1 change: 1 addition & 0 deletions packages/react-ui/components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ export class Button extends React.Component<ButtonProps, ButtonState> {
checked && styles.checkedDisabled2022(this.theme),
borderless && styles.borderless2022(),
use === 'backless' && !checked && styles.backlessDisabled2022(this.theme),
use === 'text' && styles.textDisabled2022(),
]
: [
active && !checked && activeStyles[use](this.theme),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,11 @@ export const HoverTextColor: Story = () => {

HoverTextColor.parameters = {
creevey: {
skip: { in: /^(?!\bfirefox(2022)?\b)/ },
skip: {
'hover does not work in chrome': {
in: /^(?!\bfirefox(2022)?\b)/,
},
},
tests: {
async hover() {
await this.browser
Expand Down
4 changes: 2 additions & 2 deletions packages/react-ui/internal/themes/Theme2022.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ export class Theme2022 extends (class {} as typeof DefaultThemeInternal) {

public static btnBacklessHoverBg = 'rgba(0, 0, 0, 0.06) !important';

public static btnTextBg = 'transparent !important';
public static btnTextHoverBg = 'rgba(0, 0, 0, 0.06) !important';
public static btnTextBg = 'transparent';
public static btnTextHoverBg = 'rgba(0, 0, 0, 0.06)';

public static btnBorderRadiusSmall = '8px';
public static btnBorderRadiusMedium = '8px';
Expand Down

0 comments on commit 0801972

Please sign in to comment.