-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c91486c
commit 8afbb73
Showing
6 changed files
with
184 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './ThemeProvider' | ||
export * from './theme' | ||
export { useTheme } from '@emotion/react' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
86 changes: 86 additions & 0 deletions
86
packages/web/src/pages/sign-up-page/components/FollowArtistTile.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
import { HTMLProps } from 'react' | ||
|
||
import { UserMetadata, imageProfilePicEmpty } from '@audius/common' | ||
import { | ||
Avatar, | ||
Box, | ||
Divider, | ||
Flex, | ||
IconNote, | ||
IconUser, | ||
IconVerified, | ||
Paper, | ||
Text | ||
} from '@audius/harmony' | ||
|
||
type FollowArtistTileProps = { | ||
user: UserMetadata | ||
} & HTMLProps<HTMLInputElement> | ||
|
||
const FollowArtistTile = (props: FollowArtistTileProps) => { | ||
const { | ||
user: { | ||
user_id, | ||
name, | ||
cover_photo, | ||
profile_picture_sizes, | ||
is_verified, | ||
track_count, | ||
follower_count | ||
}, | ||
checked, | ||
onChange | ||
} = props | ||
return ( | ||
<Paper css={{ minWidth: 200 }}> | ||
<Flex w='100%' h='100%' direction='column' alignItems='center'> | ||
<Box w='100%' h={68} css={{ backgroundImage: `url(${cover_photo})` }} /> | ||
<Box w={72} h={72}> | ||
<Avatar | ||
variant='strong' | ||
src={profile_picture_sizes ?? imageProfilePicEmpty} | ||
/> | ||
</Box> | ||
<Flex direction='column' alignItems='center' gap='l' p='s'> | ||
<Flex direction='column' alignItems='center' gap='s'> | ||
<Flex direction='row' gap='xs' alignItems='center'> | ||
<Text variant='title' size='s' strength='default'> | ||
{name} | ||
</Text> | ||
{is_verified ? ( | ||
<IconVerified css={{ width: 12, height: 12 }} /> | ||
) : null} | ||
</Flex> | ||
<Flex direction='row' gap='s' alignItems='center'> | ||
<Flex direction='row' gap='xs' alignItems='center'> | ||
<IconNote width={16} height={16} color='subdued' /> | ||
<Text variant='body' size='s' strength='strong'> | ||
{track_count} | ||
</Text> | ||
</Flex> | ||
{/* TODO: Divider height not working */} | ||
<Divider /> | ||
<Flex direction='row' gap='xs' alignItems='center'> | ||
<IconUser width={16} height={16} color='subdued' /> | ||
<Text variant='body' size='s' strength='strong'> | ||
{follower_count} | ||
</Text> | ||
</Flex> | ||
</Flex> | ||
</Flex> | ||
<label key={user_id}> | ||
<input | ||
type='checkbox' | ||
name={String(user_id)} | ||
onChange={onChange} | ||
checked={checked} | ||
/> | ||
{name} | ||
</label> | ||
</Flex> | ||
</Flex> | ||
</Paper> | ||
) | ||
} | ||
|
||
export default FollowArtistTile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters