Skip to content

Commit 6f4d71b

Browse files
Merge pull request #49 from dnd-side-project/feature/#40/playlist-add
2 parents 658a965 + 110a795 commit 6f4d71b

File tree

15 files changed

+510
-3
lines changed

15 files changed

+510
-3
lines changed
Lines changed: 3 additions & 0 deletions
Loading

src/assets/icons/icn_drag.svg

Lines changed: 4 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 4 additions & 0 deletions
Loading

src/assets/icons/icn_pin.svg

Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading

src/assets/icons/icn_share.svg

Lines changed: 14 additions & 0 deletions
Loading

src/assets/icons/icn_trash.svg

Lines changed: 3 additions & 0 deletions
Loading

src/assets/icons/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,15 @@ export { default as Cancel } from './icn_cancel.svg?react'
1212
export { default as Gear } from './icn_gear.svg?react'
1313
export { default as LeftArrow } from './icn_left_arrow.svg?react'
1414
export { default as RightArrow } from './icn_right_arrow.svg?react'
15+
export { default as DownArrow } from './icn_down_arrow.svg?react'
1516
export { default as Logo } from './icn_logo.svg?react'
1617
export { default as Notification } from './icn_notification.svg?react'
18+
export { default as PencilPrimary } from './icn_pencil_primary.svg?react'
1719
export { default as Plus } from './icn_plus.svg?react'
1820
export { default as Play } from './icn_play.svg?react'
21+
export { default as Pin } from './icn_pin.svg?react'
22+
export { default as PinPrimary } from './icn_pin_primary.svg?react'
23+
export { default as Share } from './icn_share.svg?react'
24+
export { default as Trash } from './icn_trash.svg?react'
25+
export { default as HelpCircle } from './icn_help_circle.svg?react'
26+
export { default as Drag } from './icn_drag.svg?react'

src/pages/customize/index.tsx

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
import { useNavigate } from 'react-router-dom'
2+
3+
import styled from 'styled-components'
4+
5+
import { useDevice, type DeviceType } from '@shared/hooks/useDevice'
6+
import { Button, Header, SvgButton } from '@shared/ui'
7+
8+
import { LeftArrow } from '@/assets/icons'
9+
10+
const Customize = () => {
11+
const navigate = useNavigate()
12+
const deviceType = useDevice()
13+
14+
return (
15+
<CustomizeWrap>
16+
<Header
17+
left={<SvgButton icon={LeftArrow} width={24} height={24} onClick={() => navigate(-1)} />}
18+
right={
19+
<Button state="primary" size="S" onClick={() => navigate(-1)}>
20+
저장
21+
</Button>
22+
}
23+
/>
24+
<CdBase $deviceType={deviceType} />
25+
<ThemeContainer>
26+
<ThemeTabs>
27+
<ThemeTab $isActive>테마</ThemeTab>
28+
<ThemeTab $isActive={false}>테마</ThemeTab>
29+
<ThemeTab $isActive={false}>테마</ThemeTab>
30+
<ThemeTab $isActive={false}>테마</ThemeTab>
31+
<ThemeTab $isActive={false}>테마</ThemeTab>
32+
<ThemeTab $isActive={false}>테마</ThemeTab>
33+
</ThemeTabs>
34+
35+
<ThemeGrid>
36+
<AddThemeButton>
37+
<span>+</span>
38+
</AddThemeButton>
39+
<ThemeItem />
40+
<ThemeItem />
41+
<ThemeItem />
42+
<ThemeItem />
43+
<ThemeItem />
44+
<ThemeItem />
45+
<ThemeItem />
46+
</ThemeGrid>
47+
</ThemeContainer>
48+
</CustomizeWrap>
49+
)
50+
}
51+
52+
export default Customize
53+
54+
const CustomizeWrap = styled.div`
55+
width: 100%;
56+
height: 100dvh;
57+
display: flex;
58+
flex-direction: column;
59+
`
60+
61+
const CdBase = styled.div<{ $deviceType: DeviceType }>`
62+
margin: 35px auto;
63+
width: ${({ $deviceType }) =>
64+
$deviceType === 'mobile' ? 'clamp(280px, 300px, 335px)' : '335px'};
65+
height: ${({ $deviceType }) =>
66+
$deviceType === 'mobile' ? 'clamp(280px, 300px, 335px)' : '335px'};
67+
border-radius: 50%;
68+
background: ${({ theme }) => theme.GRADIENT.hologram};
69+
`
70+
71+
const ThemeContainer = styled.div`
72+
margin: 0 -20px;
73+
width: calc(100% + 40px);
74+
flex: 1;
75+
border-radius: 12px 12px 0 0;
76+
background-color: ${({ theme }) => theme.COLOR['gray-700']};
77+
overflow-y: auto;
78+
padding: 20px;
79+
`
80+
81+
const ThemeTabs = styled.div`
82+
display: flex;
83+
gap: 8px;
84+
margin-bottom: 20px;
85+
overflow-x: auto;
86+
`
87+
88+
const ThemeTab = styled.button<{ $isActive: boolean }>`
89+
padding: 8px 16px;
90+
border-radius: 20px;
91+
background-color: ${({ $isActive, theme }) =>
92+
$isActive ? theme.COLOR['gray-600'] : 'transparent'};
93+
color: ${({ $isActive, theme }) =>
94+
$isActive ? theme.COLOR['primary-normal'] : theme.COLOR['gray-300']};
95+
white-space: nowrap;
96+
border: none;
97+
`
98+
99+
const ThemeGrid = styled.div`
100+
display: grid;
101+
grid-template-columns: repeat(4, 1fr);
102+
gap: 12px;
103+
margin-bottom: 20px;
104+
`
105+
106+
const AddThemeButton = styled.button`
107+
width: 100%;
108+
aspect-ratio: 1/1;
109+
border-radius: 8px;
110+
background-color: ${({ theme }) => theme.COLOR['gray-600']};
111+
border: none;
112+
display: flex;
113+
align-items: center;
114+
justify-content: center;
115+
116+
span {
117+
font-size: 24px;
118+
color: ${({ theme }) => theme.COLOR['gray-400']};
119+
}
120+
`
121+
122+
const ThemeItem = styled.div`
123+
width: 100%;
124+
aspect-ratio: 1/1;
125+
border-radius: 8px;
126+
background-color: ${({ theme }) => theme.COLOR['gray-800']};
127+
`

0 commit comments

Comments
 (0)