File tree Expand file tree Collapse file tree 2 files changed +14
-7
lines changed
src/design-system/decorators/color-schema Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,4 @@ export const storyContainer = style([
1414export const root = style ( {
1515 minHeight : '100%' ,
1616 height : '100%' ,
17- display : 'flex' ,
18- flexDirection : 'row' ,
1917} ) ;
Original file line number Diff line number Diff line change @@ -4,13 +4,22 @@ import type { DecoratorFunction } from '@storybook/csf/dist/story';
44import type { ReactFramework } from '@storybook/react' ;
55
66import { ThemeColorScheme , LocalThemeProvider } from '../../../design-tokens' ;
7+ import { Flex } from '../../flex' ;
78
89import * as styles from './color-schema.css' ;
910
10- export const colorSchemaDecorator : DecoratorFunction <
11- ReactFramework
12- > = Story => (
13- < div className = { styles . root } >
11+ export const colorSchemaDecorator : DecoratorFunction < ReactFramework > = (
12+ Story ,
13+ {
14+ parameters : {
15+ decorators : { layout = 'horizontal' } ,
16+ } ,
17+ } ,
18+ ) => (
19+ < Flex
20+ className = { styles . root }
21+ flexDirection = { layout === 'horizontal' ? 'row' : 'column' }
22+ >
1423 < LocalThemeProvider
1524 colorScheme = { ThemeColorScheme . Light }
1625 className = { styles . storyContainer }
@@ -23,5 +32,5 @@ export const colorSchemaDecorator: DecoratorFunction<
2332 >
2433 < Story />
2534 </ LocalThemeProvider >
26- </ div >
35+ </ Flex >
2736) ;
You can’t perform that action at this time.
0 commit comments