-
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.
* feat: 전체 노트 조회 페이지 네비게이션 구현 * feat: 홈, 전체노트, 휴지통 페이지 별 노트 UI 구현 * feat: 전체노트, 휴지통 페이지 노트 체크박스 UI 구현
- Loading branch information
1 parent
58c182c
commit 38d3e61
Showing
21 changed files
with
581 additions
and
148 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
import { useState } from 'react'; | ||
import { Button, Checkbox, Flex, Image, Stack } from '@chakra-ui/react'; | ||
import styled from '@emotion/styled'; | ||
import { useNavigate } from 'react-router-dom'; | ||
import { BaseButton, Body, Nav, NoteList, PATH, styleToken, Typography } from '@/shared'; | ||
|
||
export const AllNote = () => { | ||
const navigate = useNavigate(); | ||
const [checkedItems, setCheckedItems] = useState([false, false]); | ||
|
||
const allChecked = checkedItems.every(Boolean); | ||
const isIndeterminate = checkedItems.some(Boolean) && !allChecked; | ||
// https://v2.chakra-ui.com/docs/components/checkbox#indeterminate | ||
|
||
const handleNewNote = () => { | ||
navigate(PATH.NOTE); | ||
}; | ||
|
||
return ( | ||
<> | ||
<Nav /> | ||
<Body> | ||
<Container> | ||
<Flex | ||
flexDirection="row" | ||
justify="space-between" | ||
align="center" | ||
width="100%" | ||
style={{ | ||
padding: '29px 35px 28px 47px', | ||
}} | ||
> | ||
<Typography variant="h1" fontWeight={400}> | ||
전체 노트 | ||
</Typography> | ||
<BaseButton type="button" theme="gray" onClick={handleNewNote}> | ||
<Typography variant="subtitle2">노트 만들기</Typography> | ||
</BaseButton> | ||
</Flex> | ||
<Flex alignItems="center" margin="0 0 1px 8px"> | ||
<Checkbox | ||
padding="16px 14px 16px 17px" | ||
isChecked={allChecked} | ||
isIndeterminate={isIndeterminate} | ||
onChange={(e) => setCheckedItems([e.target.checked, e.target.checked])} | ||
/> | ||
<Stack direction="row" spacing={4}> | ||
<Button | ||
colorScheme="blackAlpha" | ||
variant="outline" | ||
height="32px" | ||
padding="0 11px" | ||
borderColor={styleToken.color.gray200} | ||
> | ||
<Image src="/src/assets/icon/share.svg" alt="노트 이동" width="16px" marginRight="6px" /> | ||
<Typography variant="subtitle1">노트 이동</Typography> | ||
</Button> | ||
<Button | ||
colorScheme="blackAlpha" | ||
variant="outline" | ||
height="32px" | ||
padding="0 11px" | ||
borderColor={styleToken.color.gray200} | ||
> | ||
<Image src="/src/assets/icon/trash.svg" alt="휴지통으로 이동" width="16px" marginRight="6px" /> | ||
<Typography variant="subtitle1">휴지통으로 이동</Typography> | ||
</Button> | ||
</Stack> | ||
</Flex> | ||
<NoteList noteType="all" /> | ||
</Container> | ||
</Body> | ||
</> | ||
); | ||
}; | ||
|
||
const Container = styled.div` | ||
height: 100%; | ||
width: 100%; | ||
`; |
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,5 @@ | ||
/** | ||
* @file Automatically generated by barrelsby. | ||
*/ | ||
|
||
export * from './AllNote'; |
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
Oops, something went wrong.