File tree Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change
1
+ .PlaygroundBox {
2
+ border-width : var (--borderWidth-thin );
3
+ border-style : solid;
4
+ border-color : var (--borderColor-default );
5
+ padding : var (--base-size-12 );
6
+ }
Original file line number Diff line number Diff line change 1
1
import type { Meta , StoryFn } from '@storybook/react-vite'
2
2
import Box from './Box'
3
+ import { clsx } from 'clsx'
4
+ import classes from './Box.stories.module.css'
3
5
4
6
export default {
5
7
title : 'Deprecated/Components/Box' ,
6
8
component : Box ,
7
9
} as Meta < typeof Box >
8
10
9
- export const Default = ( ) => < Box > Default Box</ Box >
11
+ export const Default = ( ) => < div > Default Box</ div >
10
12
11
- export const Playground : StoryFn < typeof Box > = args => < Box { ...args } > Playground</ Box >
13
+ export const Playground : StoryFn < typeof Box > = args => {
14
+ const as = args . as || 'div'
15
+ const Element = as as keyof JSX . IntrinsicElements
16
+ return < Element className = { clsx ( classes . PlaygroundBox ) } > Playground</ Element >
17
+ }
12
18
13
19
Playground . args = {
14
20
as : 'div' ,
15
- sx : {
16
- borderWidth : 1 ,
17
- borderStyle : 'solid' ,
18
- borderColor : 'border.default' ,
19
- p : 3 ,
20
- } ,
21
21
}
22
22
23
23
Playground . argTypes = {
You can’t perform that action at this time.
0 commit comments