-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #188 from GDSC-Hongik/feat/dropdown-page
[Feat] 드롭다운 페이지 마크업
- Loading branch information
Showing
22 changed files
with
510 additions
and
19 deletions.
There are no files selected for viewing
5 changes: 2 additions & 3 deletions
5
apps/wow-docs/app/component/button/_component/GuidelineTab.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
41 changes: 41 additions & 0 deletions
41
apps/wow-docs/app/component/dropdown/_components/ComponentTab.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,41 @@ | ||
import Card from "@components/Card"; | ||
import Space from "@components/Space"; | ||
import Text from "@components/Text"; | ||
import { css } from "@styled-system/css"; | ||
import Image from "next/image"; | ||
|
||
export const ComponentTab = () => { | ||
return ( | ||
<> | ||
<Space height={48} /> | ||
<Text typo="display2WebPage">Component</Text> | ||
<Space height={40} /> | ||
<Text typo="headingWebPage">Select</Text> | ||
<Space height={20} /> | ||
<Card className={containerStyle}> | ||
<Image | ||
alt="dropdown-component" | ||
height={400} | ||
src="/component/dropdown/dropdown-component-select.svg" | ||
width={330} | ||
/> | ||
</Card> | ||
<Space height={40} /> | ||
<Text typo="headingWebPage">List</Text> | ||
<Space height={20} /> | ||
<Card> | ||
<Image | ||
alt="dropdown-option" | ||
height={360} | ||
src="/component/dropdown/dropdown-component-list.svg" | ||
width={300} | ||
/> | ||
</Card> | ||
</> | ||
); | ||
}; | ||
|
||
const containerStyle = css({ | ||
display: "flex", | ||
justifyContent: "center", | ||
}); |
125 changes: 125 additions & 0 deletions
125
apps/wow-docs/app/component/dropdown/_components/GuidelineTab.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,125 @@ | ||
import Card from "@components/Card"; | ||
import ImageCards from "@components/ImageCards"; | ||
import Space from "@components/Space"; | ||
import Text from "@components/Text"; | ||
import Title from "@components/Text/Title"; | ||
import { widthDropdownItems } from "@constants/store"; | ||
import { css } from "@styled-system/css"; | ||
import { Flex } from "@styled-system/jsx"; | ||
import Image from "next/image"; | ||
import type { CSSProperties } from "react"; | ||
import Chip from "wowds-ui/Chip"; | ||
import Divider from "wowds-ui/Divider"; | ||
import DropDown from "wowds-ui/DropDown"; | ||
import DropDownOption from "wowds-ui/DropDownOption"; | ||
|
||
export const GuidelineTab = () => { | ||
return ( | ||
<> | ||
<Space height={48} /> | ||
<Text as="h2" typo="display2WebPage"> | ||
Guideline | ||
</Text> | ||
<Space height={40} /> | ||
<Title | ||
main="List Combination" | ||
variant="component" | ||
sub={ | ||
<> | ||
List 컴포넌트를 사용하여 선택지 영역을 조합, | ||
<br /> H값은 Hug로 설정하되, 최대 300px로 제한하고 넘칠 시 스크롤바 | ||
사용 | ||
</> | ||
} | ||
/> | ||
<Space height={20} /> | ||
<Card className={containerStyle}> | ||
<Image | ||
alt="dropdown-guide-list-combination-1" | ||
height={364} | ||
src="/component/dropdown/dropdown-guide-1.svg" | ||
width={907} | ||
/> | ||
<Space height={20} /> | ||
<Image | ||
alt="dropdown-guide-list-combination-2" | ||
height={364} | ||
src="/component/dropdown/dropdown-guide-2.svg" | ||
width={907} | ||
/> | ||
</Card> | ||
<Space height={40} /> | ||
<Divider /> | ||
<Space height={40} /> | ||
<Text as="h3" typo="headingWebPage"> | ||
Width | ||
</Text> | ||
<Space height={40} /> | ||
<ImageCards items={widthDropdownItems} /> | ||
<Text color="sub" typo="body1"> | ||
그 외에는 함께 사용되는 요소의 너비에 맞추기 | ||
</Text> | ||
<Space height={20} /> | ||
<Card className={containerStyle}> | ||
<Image | ||
alt="dropdown-guide-list-2" | ||
height={230} | ||
src="/component/dropdown/dropdown-guide-5.svg" | ||
width={907} | ||
/> | ||
</Card> | ||
<Space height={40} /> | ||
<Divider /> | ||
<Space height={40} /> | ||
<Text as="h3" typo="headingWebPage"> | ||
Usuage | ||
</Text> | ||
<Space height={40} /> | ||
<Title main="L Size" sub="Label 텍스트 활용" variant="component" /> | ||
<Space height={20} /> | ||
<Card className={containerStyle}> | ||
<Flex alignItems="center" gap="37px"> | ||
<Chip label="Label 0" /> | ||
<DropDown | ||
label="Label" | ||
placeholder="목록을 눌러 선택하세요" | ||
style={dropdownStyle} | ||
> | ||
<DropDownOption text="Text" value="Text" /> | ||
</DropDown> | ||
</Flex> | ||
<Space height={40} /> | ||
<Flex gap="37px"> | ||
<Chip label="Label X" /> | ||
<DropDown placeholder="목록을 눌러 선택하세요" style={dropdownStyle}> | ||
<DropDownOption text="Text" value="Text" /> | ||
</DropDown> | ||
</Flex> | ||
</Card> | ||
<Space height={40} /> | ||
<Text color="sub" typo="body1"> | ||
텍스트 필드와 함께 사용 가능 | ||
</Text> | ||
<Space height={20} /> | ||
<Card className={containerStyle}> | ||
<Image | ||
alt="dropdown-guide-usuage-textfield" | ||
height={161} | ||
src="/component/dropdown/dropdown-guide-6.svg" | ||
width={907} | ||
/> | ||
</Card> | ||
</> | ||
); | ||
}; | ||
|
||
const containerStyle = css({ | ||
display: "flex", | ||
justifyContent: "center", | ||
flexDirection: "column", | ||
alignItems: "center", | ||
}); | ||
|
||
const dropdownStyle: CSSProperties = { | ||
width: "360px", | ||
}; |
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,64 @@ | ||
import Card from "@components/Card"; | ||
import ComponentDetailTabs from "@components/ComponentDetailTabs"; | ||
import Space from "@components/Space"; | ||
import Title from "@components/Text/Title"; | ||
import { componentItems } from "@constants/pageData"; | ||
import { css } from "@styled-system/css"; | ||
import type { Metadata } from "next"; | ||
import type { CSSProperties } from "react"; | ||
import DropDown from "wowds-ui/DropDown"; | ||
import DropDownOption from "wowds-ui/DropDownOption"; | ||
|
||
import { ComponentTab } from "@/component/dropdown/_components/ComponentTab"; | ||
import { GuidelineTab } from "@/component/dropdown/_components/GuidelineTab"; | ||
|
||
export const metadata: Metadata = { | ||
title: "DropDown", | ||
description: "와우 디자인 시스템의 dropdown component 입니다.", | ||
}; | ||
|
||
const DropDownComponentPage = () => { | ||
const dropdownPageData = componentItems.find( | ||
(item) => item.title === "Dropdown" | ||
); | ||
|
||
return ( | ||
<> | ||
<Title | ||
main={dropdownPageData?.title ?? ""} | ||
sub={dropdownPageData?.description ?? ""} | ||
variant="header" | ||
/> | ||
<Space height={40} /> | ||
<Card className={cardStyle}> | ||
<DropDown label="Label" placeholder="선택하세요" style={dropdownStyle}> | ||
<DropDownOption text="Text" value="Text" /> | ||
</DropDown> | ||
<DropDown | ||
defaultValue="Text" | ||
placeholder="내용을 입력하세요" | ||
style={dropdownStyle} | ||
> | ||
<DropDownOption text="Text" value="Text" /> | ||
</DropDown> | ||
</Card> | ||
<Space height={92} /> | ||
<ComponentDetailTabs | ||
componentTab={<ComponentTab />} | ||
guidelineTab={<GuidelineTab />} | ||
/> | ||
<Space height={92} /> | ||
</> | ||
); | ||
}; | ||
|
||
export default DropDownComponentPage; | ||
|
||
const dropdownStyle: CSSProperties = { | ||
width: "300px", | ||
}; | ||
|
||
const cardStyle = css({ | ||
alignItems: "end", | ||
gap: "20px", | ||
}); |
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
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.