Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 89fae40

Browse files
authored
feat(avatar): a mute-mask concept (#1070)
1 parent 086974d commit 89fae40

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

src/components/TheAvatar/PostItemAvatar.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import React from 'react'
22

3-
// import { ICON } from '@/config'
3+
import { ICON } from '@/config'
44
import ImgFallback from '@/components/ImgFallback'
55
import {
66
Wrapper,
77
InnerShadow,
88
QuoteShadow,
99
Avatar,
1010
QuoteAvatar,
11+
MaskIcon,
1112
} from './styles/post_item_avatar'
1213

1314
const PostItemAvatar = ({ user, onSelect }) => {
@@ -25,7 +26,9 @@ const PostItemAvatar = ({ user, onSelect }) => {
2526
/>
2627
)}
2728
{user.login === 'mydearxym' ? <QuoteShadow /> : <InnerShadow />}
28-
{/* <Tail src={`${ICON}/shape/tail.svg`} /> */}
29+
{user.login === 'mydearxym' && (
30+
<MaskIcon src={`${ICON}/user/mute-mask.svg`} />
31+
)}
2932
</Wrapper>
3033
)
3134
}

src/components/TheAvatar/styles/post_item_avatar.ts

+8
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ export const QuoteAvatar = styled(Avatar)`
3838
border: 2px solid;
3939
border-color: ${theme('avatar.quote')};
4040
`
41+
export const MaskIcon = styled(Img)`
42+
position: absolute;
43+
bottom: -4px;
44+
left: -3px;
45+
${css.size(22)};
46+
fill: #bd572b;
47+
z-index: 2;
48+
`
4149
export const Tail = styled(TailBase)`
4250
${Wrapper}:hover & {
4351
left: -6px;

0 commit comments

Comments
 (0)