1- import { Button , Checkbox , Icon } from '@stoplight/ui-kit ' ;
1+ import { Button , Flex , InvertTheme , subscribeTheme } from '@stoplight/mosaic ' ;
22import { action } from '@storybook/addon-actions' ;
33import { boolean , number , object , select , withKnobs } from '@storybook/addon-knobs' ;
44import { storiesOf } from '@storybook/react' ;
@@ -12,6 +12,8 @@ const allOfSchema = require('../__fixtures__/combiners/allOfs/base.json');
1212const schema = require ( '../__fixtures__/default-schema.json' ) ;
1313const stressSchema = require ( '../__fixtures__/stress-schema.json' ) ;
1414
15+ subscribeTheme ( { mode : 'light' } ) ;
16+
1517storiesOf ( 'JsonSchemaViewer' , module )
1618 . addDecorator ( withKnobs )
1719 . addDecorator ( storyFn => < Wrapper > { storyFn ( ) } </ Wrapper > )
@@ -47,10 +49,10 @@ storiesOf('JsonSchemaViewer', module)
4749 return (
4850 < >
4951 < SchemaRow treeListNode = { node } rowOptions = { rowOptions } />
50- < div className = "flex h- full items- center">
51- < Button className = "pl-1 mr-1" small minimal icon = { < Icon color = "grey" iconSize = { 12 } icon = "issue" /> } />
52- < Checkbox className = "mb-0 " />
53- </ div >
52+ < Flex h = " full" alignItems = " center">
53+ < Button pl = { 1 } mr = { 1 } size = "sm" appearance = "minimal" icon = "issue" />
54+ < input type = "checkbox " />
55+ </ Flex >
5456 </ >
5557 ) ;
5658 } ;
@@ -149,14 +151,18 @@ storiesOf('JsonSchemaViewer', module)
149151 mergeAllOf = { boolean ( 'mergeAllOf' , true ) }
150152 />
151153 ) )
152- . add ( 'dark' , ( ) => (
153- < div style = { { height : '100vh' } } className = "bp3-dark bg-gray-8" >
154- < JsonSchemaViewer
155- schema = { schema as JSONSchema4 }
156- defaultExpandedDepth = { number ( 'defaultExpandedDepth' , 2 ) }
157- expanded = { boolean ( 'expanded' , false ) }
158- onGoToRef = { action ( 'onGoToRef' ) }
159- mergeAllOf = { boolean ( 'mergeAllOf' , true ) }
160- />
161- </ div >
162- ) ) ;
154+ . add ( 'dark' , ( ) => {
155+ return (
156+ < InvertTheme >
157+ < div style = { { height : '100vh' } } >
158+ < JsonSchemaViewer
159+ schema = { schema as JSONSchema4 }
160+ defaultExpandedDepth = { number ( 'defaultExpandedDepth' , 2 ) }
161+ expanded = { boolean ( 'expanded' , false ) }
162+ onGoToRef = { action ( 'onGoToRef' ) }
163+ mergeAllOf = { boolean ( 'mergeAllOf' , true ) }
164+ />
165+ </ div >
166+ </ InvertTheme >
167+ ) ;
168+ } ) ;
0 commit comments