Skip to content

Commit d70d624

Browse files
authored
Merge pull request #247 from DaleStudy/173-example-home
예제 UI ν™ˆνŽ˜μ΄μ§€
2 parents 2bd606e + a13d725 commit d70d624

File tree

1 file changed

+92
-0
lines changed

1 file changed

+92
-0
lines changed
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
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

Comments
Β (0)