PHP 8.2.30
Preview: box.stories.tsx Size: 1.12 KB
//proc/thread-self/root/home/byroehnu/.trash/node_modules11/@adminjs/design-system/src/atoms/box/box.stories.tsx

import { Meta, StoryFn, StoryObj } from '@storybook/react'
import React from 'react'

import { Button, Header, Text } from '../index.js'
import { Box, BoxProps } from './index.js'

export const Default: StoryObj = {
  render: (props) => <Box {...props}>Box example</Box>,
}

const variants: BoxProps['variant'][] = ['card', 'container', 'grey', 'transparent', 'white']

export const simpleWhiteGrayWrapper: StoryFn = () => (
  <Box variant="grey">
    <Box variant="white">
      <Text>This is the default wrapper in the application</Text>
    </Box>
  </Box>
)

export const positioningButtons: StoryFn = () => (
  <Box variant="grey">
    <Box variant="white" flex flexDirection="row">
      <Box flexGrow={1}>
        <Header.H3>Some header</Header.H3>
      </Box>
      <Box flexShrink={0}>
        <Button>Example Button On The Right</Button>
      </Box>
    </Box>
  </Box>
)

const meta: Meta<typeof Box> = {
  title: 'DesignSystem/Atoms/Box',
  component: Box,
  parameters: {
    controls: {
      include: ['variant'],
    },
  },
  argTypes: {
    variant: { options: variants, control: { type: 'select' } },
  },
}

export default meta

Directory Contents

Dirs: 0 × Files: 5

Name Size Perms Modified Actions
324 B lrw-r--r-- 2026-02-28 00:31:38
Edit Download
1.60 KB lrw-r--r-- 2026-02-28 00:31:38
Edit Download
1.12 KB lrw-r--r-- 2026-02-28 00:31:52
Edit Download
3.05 KB lrw-r--r-- 2026-02-28 00:31:52
Edit Download
26 B lrw-r--r-- 2026-02-28 00:31:44
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).