Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Commit 7de8cbb

Browse files
committed
aligned with latest design
1 parent c1f9c9c commit 7de8cbb

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

packages/react/src/themes/teams/components/Alert/alertStyles.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,11 @@ const alertStyles: ComponentSlotStylesInput<AlertProps, AlertVariables> = {
8181
flexGrow: 1,
8282
}),
8383

84-
action: ({ variables: v }): ICSSInJSStyle => ({
84+
action: ({ props: p, variables: v, theme: { siteVariables } }): ICSSInJSStyle => ({
85+
height: v.actionSize,
86+
minWidth: v.actionSize,
8587
color: v.actionColor || 'currentColor',
88+
...(p.info && { color: siteVariables.gray02 }),
8689
}),
8790
}
8891

packages/react/src/themes/teams/components/Alert/alertVariables.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,26 @@ export interface AlertVariables {
1212
fontWeight: FontWeightProperty
1313
minHeight: string
1414
padding: string
15+
16+
actionSize: string
1517
actionColor: string
1618
}
1719

1820
export default (siteVars: SiteVariablesPrepared): AlertVariables => {
19-
const { colors } = siteVars
21+
const alertHeight = 28
22+
const borderSize = 1
2023

2124
return {
22-
border: `${pxToRem(1)} solid`,
25+
border: `${pxToRem(borderSize)} solid`,
2326
borderRadius: pxToRem(3),
24-
backgroundColor: colors.grey[50], // $app-white
27+
backgroundColor: siteVars.colors.grey[50], // $app-white
2528
borderColor: siteVars.gray06,
2629
color: siteVars.gray02,
2730
fontWeight: siteVars.fontWeightSemibold,
28-
minHeight: pxToRem(34),
29-
padding: `0 0 0 ${pxToRem(8)}`,
31+
minHeight: pxToRem(alertHeight),
32+
padding: `0 0 0 ${pxToRem(16)}`,
33+
34+
actionSize: pxToRem(alertHeight - 2 * borderSize),
3035
actionColor: undefined,
3136
}
3237
}

0 commit comments

Comments
 (0)