Skip to content

Commit c3939fb

Browse files
authored
fix(MessageViewButton): update styles to latest specs (#5307)
Fixes #5297
1 parent fea62a0 commit c3939fb

File tree

1 file changed

+17
-5
lines changed
  • packages/main/src/components/MessageViewButton

1 file changed

+17
-5
lines changed

packages/main/src/components/MessageViewButton/index.tsx

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,25 @@ const buttonStyles = Object.values(ValueState).reduce((acc, cur) => {
2525
cssType = 'Critical';
2626
break;
2727
default:
28-
cssType = 'Neutral';
28+
cssType = 'Information';
2929
}
3030
const standard = `&[data-type="${cur}"]`;
3131
const hover = `&[data-type="${cur}"]:hover`;
3232
const active = `&[data-type="${cur}"]:active`;
33+
3334
return {
3435
...acc,
36+
textShadow:
37+
cssType === 'Information'
38+
? ThemingParameters.sapContent_TextShadow
39+
: ThemingParameters.sapContent_ContrastTextShadow,
3540
[standard]: {
41+
'&::part(button)::after': {
42+
borderColor:
43+
cssType === 'Information'
44+
? ThemingParameters.sapContent_FocusColor
45+
: ThemingParameters.sapContent_ContrastFocusColor
46+
},
3647
color: ThemingParameters[`sapButton_${cssType}_TextColor`],
3748
background: ThemingParameters[`sapButton_${cssType}_Background`],
3849
borderColor: ThemingParameters[`sapButton_${cssType}_BorderColor`]
@@ -45,16 +56,17 @@ const buttonStyles = Object.values(ValueState).reduce((acc, cur) => {
4556
[active]: {
4657
color: ThemingParameters[`sapButton_${cssType}_Active_TextColor`],
4758
background: ThemingParameters[`sapButton_${cssType}_Active_Background`],
48-
borderColor: ThemingParameters[`sapButton_${cssType}_Active_BorderColor`]
59+
borderColor: ThemingParameters[`sapButton_${cssType}_Active_BorderColor`],
60+
'&::part(button)::after': {
61+
borderColor: ThemingParameters.sapContent_FocusColor
62+
}
4963
}
5064
};
5165
}, {});
5266

5367
const useStyles = createUseStyles(
5468
{
55-
btn: {
56-
...buttonStyles
57-
}
69+
btn: buttonStyles
5870
},
5971
{ name: 'MessageViewButtonStyles' }
6072
);

0 commit comments

Comments
 (0)