diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0d55914..25249b5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,4 +24,4 @@ jobs: steps: - uses: actions/checkout@v1 - uses: actions/setup-python@v2.3.1 - - uses: pre-commit/action@v2.0.3 + - uses: pre-commit/action@v3.0.1 diff --git a/src/avatar.js b/src/avatar.js index 223c566..e432fa2 100644 --- a/src/avatar.js +++ b/src/avatar.js @@ -37,10 +37,10 @@ const Avatar = ({ maxWidth: maxWidth, height: 'auto', borderRadius: '50%', + overflow: 'hidden', position: 'relative', display: 'inline-block', verticalAlign: 'top', - bg: color, ...sx, }} {...props} @@ -49,16 +49,27 @@ const Avatar = ({ alt={altProp} src={srcProp} sx={{ - opacity: color && color !== 'transparent' ? 0.25 : 1, filter: color && color !== 'transparent' ? 'grayscale(100%) contrast(200%) brightness(100%)' : 'none', width: '100%', - borderRadius: '50%', display: 'block', }} /> + {color && color !== 'transparent' && ( + + )} ) }