-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feature/BAR-231] 저장하는 페이지 UI 구현 (#64)
* style(Card): 줄바꿈 적용 * feat: Spinner 컴포넌트 구현 * fix: bookmark -> archive 이름 통일 * refactor(_app): 빈 태그 제거 * refactor: 공통 MenuButton(MenuDropdown) 컴포넌트 적용 * feat: archive api 정의 * refactor(Tab): 마크업 및 스타일 수정 * feat: 저장하는 페이지 UI 구현 * style(NotFoundArchiveCard): 레이아웃 수정 * feat(ArchiveCardTabContent): 복사, 저장 횟수 추가 * refactor(ArchiveCardTabContent): ArchivedCard 컴포넌트 분리 * refactor(domain/저장하는): 저장하는 페이지 내 Tab 컴포넌트명 수정 * refactor: MenuButton -> MenuDropdown 컴포넌트명 수정 * feat(domain/저장하는): 수정 기능 구현 * refactor: useEditArchives -> useUpdateArchives hook 이름 수정 * style(ArchivedCard): 수정 완료 버튼 스타일 추가 * feat(domain/저장하는): 삭제 기능 구현 * refactor(domain/저장하는): null 반환 제거
- Loading branch information
Showing
41 changed files
with
769 additions
and
130 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import Layout from '@components/Layout'; | ||
import Archive from '@domain/저장하는/components/Archive'; | ||
|
||
const Page = () => { | ||
return ( | ||
<Layout> | ||
<Archive /> | ||
</Layout> | ||
); | ||
}; | ||
|
||
export default Page; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { type PropsWithChildren } from 'react'; | ||
|
||
import * as styles from './style.css'; | ||
|
||
const Column = ({ children }: PropsWithChildren) => { | ||
return <ol className={styles.container}>{children}</ol>; | ||
}; | ||
|
||
export default Column; |
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,8 @@ | ||
import { style } from '@vanilla-extract/css'; | ||
|
||
export const container = style({ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
gap: '16px', | ||
flex: '1', | ||
}); |
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,25 @@ | ||
import Icon from '@components/Icon'; | ||
import { COLORS } from '@styles/tokens'; | ||
|
||
import Dropdown from '..'; | ||
|
||
interface MenuDropdownProps { | ||
onEdit?: () => void; | ||
onDelete?: () => void; | ||
} | ||
|
||
const MenuDropdown = ({ onEdit, onDelete }: MenuDropdownProps) => { | ||
return ( | ||
<Dropdown size="small" placement="bottom-right"> | ||
<Dropdown.Trigger> | ||
<Icon icon="menu" color={COLORS['Grey/300']} /> | ||
</Dropdown.Trigger> | ||
<Dropdown.List> | ||
{onEdit && <Dropdown.Item onClick={onEdit}>수정하기</Dropdown.Item>} | ||
{onDelete && <Dropdown.Item onClick={onDelete}>삭제하기</Dropdown.Item>} | ||
</Dropdown.List> | ||
</Dropdown> | ||
); | ||
}; | ||
|
||
export default MenuDropdown; |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import * as styles from './style.css'; | ||
|
||
const Spinner = () => { | ||
return ( | ||
<div className={styles.wrapper}> | ||
<div className={styles.spinner} /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Spinner; |
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,22 @@ | ||
import { keyframes, style } from '@vanilla-extract/css'; | ||
|
||
import { COLORS } from '@styles/tokens'; | ||
|
||
const spin = keyframes({ | ||
to: { transform: 'rotate(360deg)' }, | ||
}); | ||
|
||
export const wrapper = style({ | ||
width: 'fit-content', | ||
margin: '0 auto', | ||
}); | ||
|
||
export const spinner = style({ | ||
display: 'inline-block', | ||
width: '38px', | ||
height: '38px', | ||
border: `5px solid ${COLORS['Grey/100']}`, | ||
borderRadius: '50%', | ||
borderTopColor: COLORS['Blue/Default'], | ||
animation: `${spin} 1s ease-in-out infinite`, | ||
}); |
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,18 +1,32 @@ | ||
import type { PropsWithChildren } from 'react'; | ||
import type { HTMLAttributes, PropsWithChildren } from 'react'; | ||
import clsx from 'clsx'; | ||
|
||
import { useTabsContext } from '..'; | ||
import * as styles from '../style.css'; | ||
|
||
export interface TabsContentProps { | ||
export interface TabsContentProps extends HTMLAttributes<HTMLElement> { | ||
value: string; | ||
} | ||
|
||
const TabsContent = ({ | ||
children, | ||
value, | ||
...props | ||
}: PropsWithChildren<TabsContentProps>) => { | ||
const { selectedTab } = useTabsContext(); | ||
const { type, selectedTab } = useTabsContext(); | ||
|
||
return <>{selectedTab === value ? children : null}</>; | ||
return ( | ||
<> | ||
{selectedTab === value ? ( | ||
<section | ||
{...props} | ||
className={clsx(styles.tabContent({ type }), props.className)} | ||
> | ||
{children} | ||
</section> | ||
) : null} | ||
</> | ||
); | ||
}; | ||
|
||
export default TabsContent; |
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
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,7 +1,7 @@ | ||
export const ROUTES = { | ||
LANDING: '/', | ||
MAIN: '/main', | ||
BOOKMARK: '/bookmark', | ||
ARCHIVE: '/archive', | ||
PRIVACY: '/terms/privacy', | ||
USE: '/terms/use', | ||
} as const; |
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
Oops, something went wrong.