|
1
|
import type { Meta, StoryObj } from "@storybook/react" |
|
2
|
import * as React from "react" |
|
3
|
|
|
4
|
import { Heading } from "@/components/heading" |
|
5
|
import { Text } from "@/components/text" |
|
6
|
import { Container } from "./container" |
|
7
|
|
|
8
|
const meta: Meta<typeof Container> = { |
|
9
|
title: "Components/Container", |
|
10
|
component: Container, |
|
11
|
} |
|
12
|
|
|
13
|
export default meta |
|
14
|
|
|
15
|
type Story = StoryObj<typeof Container> |
|
16
|
|
|
17
|
export const Default: Story = { |
|
18
|
args: { |
|
19
|
children: <Text>Hello World</Text>, |
|
20
|
}, |
|
21
|
parameters: { |
|
22
|
layout: "centered", |
|
23
|
}, |
|
24
|
} |
|
25
|
|
|
26
|
export const InLayout: Story = { |
|
27
|
render: () => ( |
|
28
|
<div className="flex h-screen w-screen"> |
|
29
|
<div className="border-ui-border-base w-full max-w-[216px] border-r p-4"> |
|
30
|
<Heading level="h3">Menubar</Heading> |
|
31
|
</div> |
|
32
|
<div className="flex w-full flex-col gap-y-3 px-8 pb-8 pt-6"> |
|
33
|
<Container> |
|
34
|
<Heading>Section 1</Heading> |
|
35
|
</Container> |
|
36
|
<Container> |
|
37
|
<Heading>Section 2</Heading> |
|
38
|
</Container> |
|
39
|
<Container> |
|
40
|
<Heading>Section 3</Heading> |
|
41
|
</Container> |
|
42
|
</div> |
|
43
|
</div> |
|
44
|
), |
|
45
|
parameters: { |
|
46
|
layout: "fullscreen", |
|
47
|
}, |
|
48
|
} |