File tree Expand file tree Collapse file tree 4 files changed +16
-11
lines changed Expand file tree Collapse file tree 4 files changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -89,5 +89,10 @@ const customCssPropertiesList = [
89
89
'styleFocusRingBorderRadius' ,
90
90
'styleFocusRingBorderWidth' ,
91
91
'styleFocusRingBoxShadow' ,
92
+ // Alert focus ring properties
93
+ 'alertFocusRingBorderColor' ,
94
+ 'alertFocusRingBorderRadius' ,
95
+ 'alertFocusRingBorderWidth' ,
96
+ 'alertFocusRingBoxShadow' ,
92
97
] ;
93
98
module . exports = customCssPropertiesList ;
Original file line number Diff line number Diff line change @@ -313,17 +313,17 @@ describe('Style API', () => {
313
313
expect ( getComputedStyle ( wrapper . findRootElement ( ) . getElement ( ) ) . getPropertyValue ( 'color' ) ) . toBe ( 'rgb(0, 0, 0)' ) ;
314
314
expect (
315
315
getComputedStyle ( wrapper . findRootElement ( ) . getElement ( ) ) . getPropertyValue (
316
- customCssProps . styleFocusRingBorderColor
316
+ customCssProps . alertFocusRingBorderColor
317
317
)
318
318
) . toBe ( 'rgb(23, 31, 118)' ) ;
319
319
expect (
320
320
getComputedStyle ( wrapper . findRootElement ( ) . getElement ( ) ) . getPropertyValue (
321
- customCssProps . styleFocusRingBorderRadius
321
+ customCssProps . alertFocusRingBorderRadius
322
322
)
323
323
) . toBe ( '6px' ) ;
324
324
expect (
325
325
getComputedStyle ( wrapper . findRootElement ( ) . getElement ( ) ) . getPropertyValue (
326
- customCssProps . styleFocusRingBorderWidth
326
+ customCssProps . alertFocusRingBorderWidth
327
327
)
328
328
) . toBe ( '4px' ) ;
329
329
Original file line number Diff line number Diff line change @@ -16,9 +16,9 @@ export function getAlertStyles(style: AlertProps['style']) {
16
16
borderWidth : style . root ?. borderWidth ,
17
17
color : style . root ?. color ,
18
18
...( style . root ?. focusRing && {
19
- [ customCssProps . styleFocusRingBorderColor ] : style . root . focusRing ?. borderColor ,
20
- [ customCssProps . styleFocusRingBorderRadius ] : style . root . focusRing ?. borderRadius ,
21
- [ customCssProps . styleFocusRingBorderWidth ] : style . root . focusRing ?. borderWidth ,
19
+ [ customCssProps . alertFocusRingBorderColor ] : style . root . focusRing ?. borderColor ,
20
+ [ customCssProps . alertFocusRingBorderRadius ] : style . root . focusRing ?. borderRadius ,
21
+ [ customCssProps . alertFocusRingBorderWidth ] : style . root . focusRing ?. borderWidth ,
22
22
} ) ,
23
23
} ;
24
24
}
Original file line number Diff line number Diff line change 37
37
padding-inline : awsui .$space-alert-horizontal ;
38
38
background-color : awsui .$color-background-container-content ;
39
39
40
- #{custom-props .$styleFocusRingBoxShadow } : 0 0 0
41
- var (#{custom-props .$styleFocusRingBorderWidth } , foundation .$box-shadow-focused-width )
42
- var (#{custom-props .$styleFocusRingBorderColor } , awsui .$color-border-item-focused );
40
+ #{custom-props .$alertFocusRingBoxShadow } : 0 0 0
41
+ var (#{custom-props .$alertFocusRingBorderWidth } , foundation .$box-shadow-focused-width )
42
+ var (#{custom-props .$alertFocusRingBorderColor } , awsui .$color-border-item-focused );
43
43
}
44
44
45
45
.alert-wrapper {
85
85
@include focus-visible .when-visible {
86
86
@include styles .focus-highlight (
87
87
$gutter : awsui .$space-button-focus-outline-gutter ,
88
- $border-radius : var (#{custom-props .$styleFocusRingBorderRadius } , awsui .$border-radius-control-default-focus-ring ),
89
- $box-shadow : var (#{custom-props .$styleFocusRingBoxShadow } )
88
+ $border-radius : var (#{custom-props .$alertFocusRingBorderRadius } , awsui .$border-radius-control-default-focus-ring ),
89
+ $box-shadow : var (#{custom-props .$alertFocusRingBoxShadow } )
90
90
);
91
91
}
92
92
}
You can’t perform that action at this time.
0 commit comments