aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorilyayudovin <ilyayudovin123@gmail.com>2020-09-11 02:00:12 +0300
committerilyayudovin <ilyayudovin123@gmail.com>2020-09-11 02:00:12 +0300
commit2174c5cb6a5d8a5d9bd61d07e330e4c315b99baf (patch)
treefcc4ba099663f0a86e7261417575499f5d611e6c
parenta03127a0a29c6896643d6043afb5fcd0d3407f7b (diff)
downloadwhich-ui-2174c5cb6a5d8a5d9bd61d07e330e4c315b99baf.tar.gz
darken avatar image while progressing new one
-rw-r--r--src/containers/Profile/ProfileInfo.tsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/containers/Profile/ProfileInfo.tsx b/src/containers/Profile/ProfileInfo.tsx
index e2fb0a9..1f5a103 100644
--- a/src/containers/Profile/ProfileInfo.tsx
+++ b/src/containers/Profile/ProfileInfo.tsx
@@ -27,8 +27,12 @@ const useStyles = makeStyles(theme => ({
avatar: {
width: 150,
height: 150,
+ position: 'relative',
margin: '0 auto'
},
+ darken: {
+ filter: 'brightness(50%)'
+ },
name: {
margin: theme.spacing(1, 0),
display: 'flex',
@@ -129,7 +133,7 @@ const ProfileInfo: React.FC<PropTypes> = ({
</FileUpload>
)}
>
- <Avatar className={classes.avatar} user={userInfo} />
+ <Avatar className={[classes.avatar, progress && classes.darken].join(' ')} user={userInfo} />
{progress > 0 && (
<CircularProgress variant="static" value={progress} className={classes.progress} />
)}