|
| 1 | +import type { StoryObj } from "@storybook/react"; |
| 2 | +import { hstack, vstack } from "../../../styled-system/patterns"; |
| 3 | +import { css } from "../../../styled-system/css"; |
| 4 | +import { Icon } from "../../components/Icon/Icon"; |
| 5 | +import { Link } from "../../components/Link/Link"; |
| 6 | +import { Text } from "../../components/Text/Text"; |
| 7 | +import { Heading } from "../../components/Heading/Heading"; |
| 8 | +import { Button } from "../../components/Button/Button"; |
| 9 | + |
| 10 | +export default { |
| 11 | + parameters: { |
| 12 | + layout: "fullscreen", |
| 13 | + }, |
| 14 | +}; |
| 15 | + |
| 16 | +export const Default: StoryObj = { |
| 17 | + render: (args) => { |
| 18 | + const MENU_ITEMS = ["μκ°", "μλΉμ€", "μ€ν 리", "μ±μ©"]; |
| 19 | + return ( |
| 20 | + <div className={vstack({ minHeight: "100vh", gap: 0 })} {...args}> |
| 21 | + <header |
| 22 | + className={hstack({ |
| 23 | + width: "100%", |
| 24 | + height: { base: "3rem", md: "4rem" }, |
| 25 | + justifyContent: "space-between", |
| 26 | + padding: { base: "0 1rem", md: "0 1.5rem" }, |
| 27 | + borderBottom: "2px solid", |
| 28 | + background: { base: "teal.1", _dark: "tealDark.1" }, |
| 29 | + borderColor: { base: "teal.7", _dark: "tealDark.7" }, |
| 30 | + color: { base: "teal.11", _dark: "tealDark.11" }, |
| 31 | + })} |
| 32 | + > |
| 33 | + <div className={css({ display: { base: "block", md: "none" } })}> |
| 34 | + <Icon name="menu" aria-label="λ©λ΄" /> |
| 35 | + </div> |
| 36 | + <img |
| 37 | + src="/logo.svg" |
| 38 | + alt="DaleUI Logo" |
| 39 | + className={css({ |
| 40 | + height: { base: "1.5rem", md: "2rem" }, |
| 41 | + objectFit: "contain", |
| 42 | + })} |
| 43 | + /> |
| 44 | + <nav |
| 45 | + className={hstack({ |
| 46 | + gap: "gap.md", |
| 47 | + display: { base: "none", md: "flex" }, |
| 48 | + })} |
| 49 | + aria-label="μ£Όμ λ©λ΄" |
| 50 | + > |
| 51 | + {MENU_ITEMS.map((item) => ( |
| 52 | + <Link key={item} underline={false}> |
| 53 | + {item} |
| 54 | + </Link> |
| 55 | + ))} |
| 56 | + </nav> |
| 57 | + <Icon name="search" aria-label="κ²μ" /> |
| 58 | + </header> |
| 59 | + <main |
| 60 | + className={vstack({ |
| 61 | + alignItems: "baseline", |
| 62 | + justifyContent: "center", |
| 63 | + flex: 1, |
| 64 | + width: "100%", |
| 65 | + paddingX: { base: "2rem", md: "12rem" }, |
| 66 | + gap: { base: "gap.md", md: "gap.lg" }, |
| 67 | + })} |
| 68 | + > |
| 69 | + <Heading level={1}>λ¬λ UI</Heading> |
| 70 | + <Text>νκ΅μ΄ μΉνμ μΈ λμμΈμμ€ν
</Text> |
| 71 | + <div> |
| 72 | + <Button variant="solid" tone="accent" size="lg"> |
| 73 | + λ¬ΈμνκΈ° |
| 74 | + </Button> |
| 75 | + </div> |
| 76 | + </main> |
| 77 | + <footer |
| 78 | + className={css({ |
| 79 | + textAlign: "center", |
| 80 | + paddingY: { base: 1, md: 2 }, |
| 81 | + borderTop: "2px solid", |
| 82 | + background: { base: "teal.1", _dark: "tealDark.1" }, |
| 83 | + borderColor: { base: "teal.7", _dark: "tealDark.7" }, |
| 84 | + width: "100%", |
| 85 | + })} |
| 86 | + > |
| 87 | + <Text>copyright DaleUI</Text> |
| 88 | + </footer> |
| 89 | + </div> |
| 90 | + ); |
| 91 | + }, |
| 92 | +}; |
0 commit comments