diff --git a/packages/harmony/src/components/layout/Divider/Divider.tsx b/packages/harmony/src/components/layout/Divider/Divider.tsx index c22720aa0c8..58e30fc6c19 100644 --- a/packages/harmony/src/components/layout/Divider/Divider.tsx +++ b/packages/harmony/src/components/layout/Divider/Divider.tsx @@ -6,5 +6,6 @@ import styled from '@emotion/styled' export const Divider = styled.div(({ theme }) => ({ minHeight: 1, minWidth: 1, + alignSelf: 'stretch', backgroundColor: theme.color.border.strong })) diff --git a/packages/harmony/src/components/layout/Paper/types.ts b/packages/harmony/src/components/layout/Paper/types.ts index 4dc39a35133..8954be60780 100644 --- a/packages/harmony/src/components/layout/Paper/types.ts +++ b/packages/harmony/src/components/layout/Paper/types.ts @@ -5,6 +5,8 @@ import type { ShadowOptions } from 'foundations' +import type { FlexProps } from '../Flex' + /** * An elevated container which stands out from the background. */ @@ -31,5 +33,5 @@ export type PaperProps = { * Elevation Shadow * @default mid */ - shadow?: Exclude -} + shadow?: Exclude | 'none' +} & FlexProps diff --git a/packages/harmony/src/foundations/spacing/spacing.css b/packages/harmony/src/foundations/spacing/spacing.css index a7bdb0e02c1..eb698cc3a24 100644 --- a/packages/harmony/src/foundations/spacing/spacing.css +++ b/packages/harmony/src/foundations/spacing/spacing.css @@ -47,4 +47,5 @@ root { --harmony-spacing-2xl: 32px; --harmony-spacing-3xl: 48px; --harmony-spacing-4xl: 64px; + --harmony-spacing-5xl: 128px; } diff --git a/packages/harmony/src/foundations/spacing/spacing.ts b/packages/harmony/src/foundations/spacing/spacing.ts index 218c8f9fc7e..f27dc78103a 100644 --- a/packages/harmony/src/foundations/spacing/spacing.ts +++ b/packages/harmony/src/foundations/spacing/spacing.ts @@ -39,7 +39,8 @@ export const spacing = { xl: 24, '2xl': 32, '3xl': 48, - '4xl': 64 + '4xl': 64, + '5xl': 128 } export type Spacing = typeof spacing diff --git a/packages/web/src/pages/sign-up-page/SignUpRootPage.tsx b/packages/web/src/pages/sign-up-page/SignUpRootPage.tsx index c4ce8fc3019..b61570b6cce 100644 --- a/packages/web/src/pages/sign-up-page/SignUpRootPage.tsx +++ b/packages/web/src/pages/sign-up-page/SignUpRootPage.tsx @@ -1,4 +1,4 @@ -import { Box } from '@audius/harmony' +import { Paper } from '@audius/harmony' import { useSelector } from 'react-redux' import { Redirect, Route, RouteProps, Switch } from 'react-router-dom' @@ -103,7 +103,7 @@ export function SignUpRoute({ children, ...rest }: RouteProps) { export const SignUpRootPage = () => { return ( - + @@ -144,6 +144,6 @@ export const SignUpRootPage = () => { - + ) } diff --git a/packages/web/src/pages/sign-up-page/components/FollowArtistTile.tsx b/packages/web/src/pages/sign-up-page/components/FollowArtistTile.tsx new file mode 100644 index 00000000000..37113d4b8b6 --- /dev/null +++ b/packages/web/src/pages/sign-up-page/components/FollowArtistTile.tsx @@ -0,0 +1,102 @@ +import { HTMLProps } from 'react' + +import { UserMetadata } from '@audius/common' +import { + Avatar, + Box, + Divider, + Flex, + IconNote, + IconUser, + IconUserFollow, + IconVerified, + Paper, + Text +} from '@audius/harmony' + +import audiusCoverPhoto from 'assets/img/4-Conductor-16-9.jpg' +import audiusProfilePic from 'assets/img/appIcon240.png' + +type FollowArtistTileProps = { + user: UserMetadata +} & HTMLProps + +const FollowArtistTile = (props: FollowArtistTileProps) => { + const { + user: { name, user_id, is_verified, track_count, follower_count }, + onChange + } = props + return ( + + + + + + + + + + + {name} + + {is_verified ? ( + + ) : null} + + + + + + {track_count} + + + {/* TODO: Divider height not working */} + + + + + {follower_count} + + + + + {/* TODO: Use Harmony FollowButton */} + + + + + ) +} + +export default FollowArtistTile diff --git a/packages/web/src/pages/sign-up-page/pages/SelectArtistsPage.tsx b/packages/web/src/pages/sign-up-page/pages/SelectArtistsPage.tsx index 5d004aa1c68..cc791dd1ed2 100644 --- a/packages/web/src/pages/sign-up-page/pages/SelectArtistsPage.tsx +++ b/packages/web/src/pages/sign-up-page/pages/SelectArtistsPage.tsx @@ -6,7 +6,15 @@ import { useGetFeaturedArtists, useGetTopArtistsInGenre } from '@audius/common' -import { Button } from '@audius/harmony' +import { + Button, + Flex, + Text, + IconArrowRight, + SelectablePill, + Paper, + Box +} from '@audius/harmony' import { Form, Formik } from 'formik' import { useDispatch } from 'react-redux' @@ -17,12 +25,16 @@ import { useNavigateToPage } from 'hooks/useNavigateToPage' import { useSelector } from 'utils/reducer' import { TRENDING_PAGE } from 'utils/route' +import { ContinueFooter } from '../components/ContinueFooter' +import FollowArtistTile from '../components/FollowArtistTile' + const messages = { header: 'Follow At Least 3 Artists', description: 'Curate your feed with tracks uploaded or reposted by anyone you follow. Click the artist’s photo to preview their music.', genresLabel: 'Selected genres', continue: 'Continue', + goBack: 'Go Back', pickArtists: (genre: string) => `Pick ${genre} Artists` } @@ -41,9 +53,10 @@ export const SelectArtistsPage = () => { const dispatch = useDispatch() const navigate = useNavigateToPage() - const handleChangeGenre = useCallback((e: ChangeEvent) => { - setCurrentGenre(e.target.value) - }, []) + // TODO: adopt SelectablePill as input + // const handleChangeGenre = useCallback((e: ChangeEvent) => { + // setCurrentGenre(e.target.value) + // }, []) const handleSubmit = useCallback( (values: SelectArtistsValues) => { @@ -74,61 +87,104 @@ export const SelectArtistsPage = () => { Status.LOADING return ( -
-

{messages.header}

-

{messages.description}

-
- {genres.map((genre) => ( - - ))} -
- - {({ values, setValues }) => { - const { artists: selectedArtists } = values - const handleChange = (e: ChangeEvent) => { - const { checked, name } = e.target - const userId = parseInt(name, 10) - const newArtists = checked - ? [userId, ...selectedArtists] - : selectedArtists.filter((value) => value !== userId) - - setValues({ artists: newArtists }) - } - return ( -
-
- {messages.pickArtists(currentGenre)} - {isLoading - ? null - : artists?.map((user) => { - const { user_id, name } = user + ))} + + + {({ values, setValues }) => { + const { artists: selectedArtists } = values + const handleChange = (e: ChangeEvent) => { + const { checked, name } = e.target + const userId = parseInt(name, 10) + const newArtists = checked + ? [userId, ...selectedArtists] + : selectedArtists.filter((value) => value !== userId) - return ( - - ) - })} -
- -
- ) - }} -
-
+ setValues({ artists: newArtists }) + } + return ( +
+
+ + {isLoading + ? null + : artists?.map((user) => { + return ( + + ) + })} + +
+
+ ) + }} + + + + + Selected TODO/3 + + ) }