File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -37,10 +37,10 @@ const Avatar = ({
3737 maxWidth : maxWidth ,
3838 height : 'auto' ,
3939 borderRadius : '50%' ,
40+ overflow : 'hidden' ,
4041 position : 'relative' ,
4142 display : 'inline-block' ,
4243 verticalAlign : 'top' ,
43- bg : color ,
4444 ...sx ,
4545 } }
4646 { ...props }
@@ -49,16 +49,27 @@ const Avatar = ({
4949 alt = { altProp }
5050 src = { srcProp }
5151 sx = { {
52- opacity : color && color !== 'transparent' ? 0.25 : 1 ,
5352 filter :
5453 color && color !== 'transparent'
5554 ? 'grayscale(100%) contrast(200%) brightness(100%)'
5655 : 'none' ,
5756 width : '100%' ,
58- borderRadius : '50%' ,
5957 display : 'block' ,
6058 } }
6159 />
60+ { color && color !== 'transparent' && (
61+ < Box
62+ sx = { {
63+ position : 'absolute' ,
64+ top : 0 ,
65+ bg : color ,
66+ width : '100%' ,
67+ height : '100%' ,
68+ opacity : 0.75 ,
69+ pointerEvents : 'none' ,
70+ } }
71+ />
72+ ) }
6273 </ Box >
6374 )
6475}
You can’t perform that action at this time.
0 commit comments