import { CalendarDotsIcon, ClockIcon, DownloadSimpleIcon, ListChecksIcon, UploadSimpleIcon, } from "@phosphor-icons/react"; import type { Meta, StoryObj } from "@storybook/react-vite"; import { Fragment } from "react"; import { Button, Flex, Grid } from "../react"; import styles from "../styles.module.css"; const gaps = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 18, 22, 26, 30, ]; const meta = { title: "Designsystem/Layout", parameters: { layout: "padded", }, decorators: [ (Story) => (
), ], } satisfies Meta; export default meta; type Story = StoryObj; export const FlexStory: Story = { name: "Flex", parameters: { showInOverview: true, }, render: () => (
), }; export const GridStory: Story = { name: "Grid", parameters: { showInOverview: true, }, render: () => (
auto
auto
Custom
100
100
300
100
100
100
100
100
100
300
300
), }; export const React: Story = { render: () => ( <>
auto
auto
Custom
100
100
300
100
100
100
100
100
100
300
300
), }; export const Gap: Story = { render: () => (
{gaps.map((gap) => ( data-gap="{gap}"
a b c
))}
), }; export const Center: Story = { parameters: { layout: "fullscreen", }, render: () => ( <>
sm (640px)
md (768px)
lg (1024px)
xl (1280px)
2xl (1536px)
), }; export const ItemSizes: Story = { render: () => ( <>

Minimumsstørrelser Grid og Flex data-items:

{[ 25, 50, 75, 100, 125, 150, 175, 200, 225, 250, 275, 300, 325, 350, 375, 400, 425, 450, 475, 500, 525, 550, 575, 600, "auto", "full", ].map((i) => (
{i}
))} ), }; export const ItemFixed: Story = { render: () => ( <> Flex data-items="100" with data-fixed (does not allow growing over data-items value):
a
b
c
d
Flex data-items="100" without data-fixed{" "} (allows items to grow):
a
b
c
d
Grid data-items="100" with data-fixed (repeats "fake" empty columns to align ish with data-items):
a
b
c
d
Grid data-items="100" without data-fixed{" "} (fills grid with actual columns):
a
b
c
d
), }; export const Align: Story = { render: () => (
data-align="stretch"
Small Medium Large
data-align="start"
Small Medium Large
data-align="center"
Small Medium Large
data-align="end"
Small Medium Large
), }; export const Justify: Story = { render: () => (
data-justify="start"
Box Box Box
data-justify="center"
Box Box Box
data-justify="end"
Box Box Box
data-justify="space-between"
Box Box Box
data-justify="space-around"
Box Box Box
data-justify="space-evenly"
Box Box Box
.grid +
data-justify="center"
Box Box Box Box Box Box
), }; export const AlignContent: Story = { render: () => (
start
Box Box Box
center
Box Box Box
end
Box Box Box
space-between
Box Box Box
space-around
Box Box Box
space-evenly
Box Box Box
), }; export const BreakCard: Story = { render: () => (

123456789

06.12.2024
19:37
Groene Tuin
🇫🇷 Frankrike
Blomquist Blomster AS
Daucus carota, Hydrangea paniculata, +4

123456789

06.12.2024
19:37
Groene Tuin
🇫🇷 Frankrike
Blomquist Blomster AS
Daucus carota, Hydrangea paniculata, +4
), };