File tree Expand file tree Collapse file tree 2 files changed +14
-11
lines changed
packages/avatars/src/styled Expand file tree Collapse file tree 2 files changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -69,15 +69,15 @@ const colorStyles = ({
6969 $borderColor,
7070 $surfaceColor
7171} : IStatusIndicatorProps & ThemeProps < DefaultTheme > ) => {
72- let boxShadow = theme . shadows . sm (
73- $surfaceColor ||
74- ( $type
75- ? getColor ( { variable : 'background.default' , theme } )
76- : ( theme . palette . white as string ) )
77- ) ;
78-
79- if ( $size === xxs ) {
80- boxShadow = boxShadow . replace ( theme . shadowWidths . sm , '1px' ) ;
72+ const shadowSize = $size === xxs ? 'xs' : 'sm' ;
73+ let boxShadow ;
74+
75+ if ( $type ) {
76+ boxShadow = theme . shadows [ shadowSize ] (
77+ $surfaceColor || getColor ( { theme , variable : 'background.default' } )
78+ ) ;
79+ } else {
80+ boxShadow = theme . shadows [ shadowSize ] ( $surfaceColor || ( theme . palette . white as string ) ) ;
8181 }
8282
8383 return css `
Original file line number Diff line number Diff line change @@ -69,12 +69,15 @@ const sizeStyles = (props: IStyledStatusIndicatorProps) => {
6969
7070const colorStyles = ( { theme, $type } : IStyledStatusIndicatorProps ) => {
7171 const foregroundColor = getColor ( { variable : 'foreground.onEmphasis' , theme } ) ;
72- let backgroundColor = getStatusColor ( theme , $type ) ;
73- let borderColor = backgroundColor ;
72+ let backgroundColor ;
73+ let borderColor ;
7474
7575 if ( $type === 'offline' ) {
7676 borderColor = getStatusColor ( theme , $type ) ;
7777 backgroundColor = getColor ( { variable : 'background.default' , theme } ) ;
78+ } else {
79+ backgroundColor = getStatusColor ( theme , $type ) ;
80+ borderColor = backgroundColor ;
7881 }
7982
8083 return css `
You can’t perform that action at this time.
0 commit comments