File tree Expand file tree Collapse file tree 5 files changed +50
-0
lines changed
build-tests-samples/heft-storybook-react-tutorial Expand file tree Collapse file tree 5 files changed +50
-0
lines changed Original file line number Diff line number Diff line change
1
+ module . exports = {
2
+ stories : [ '../lib/**/*.stories.js' ] ,
3
+ addons : [ '@storybook/addon-links' , '@storybook/addon-essentials' ]
4
+ } ;
Original file line number Diff line number Diff line change
1
+ export const parameters = {
2
+ actions : { argTypesRegex : '^on[A-Z].*' } ,
3
+ controls : {
4
+ matchers : {
5
+ color : / ( b a c k g r o u n d | c o l o r ) $ / i,
6
+ date : / D a t e $ /
7
+ }
8
+ }
9
+ } ;
Original file line number Diff line number Diff line change 4
4
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
5
"version" : " 0.2.0" ,
6
6
"configurations" : [
7
+ {
8
+ "type" : " node" ,
9
+ "request" : " launch" ,
10
+ "name" : " Debug fake.js" ,
11
+ "program" : " ${workspaceFolder}/fake.js" ,
12
+ "args" : [ " -p" , " 6006" ],
13
+ "cwd" : " ${workspaceFolder}" ,
14
+ "console" : " integratedTerminal" ,
15
+ "sourceMaps" : false
16
+ },
7
17
{
8
18
"type" : " node" ,
9
19
"request" : " launch" ,
Original file line number Diff line number Diff line change
1
+ const enginePath =
2
+ 'C:\\Git\\rushstack\\build-tests-samples\\heft-storybook-react-tutorial\\node_modules\\heft-storybook-react-tutorial-storybook\\node_modules\\@storybook\\react\\dist\\cjs\\server\\index.js' ;
3
+ debugger ;
4
+ require ( enginePath ) ;
Original file line number Diff line number Diff line change
1
+ import * as React from 'react' ;
2
+ import { ComponentStory , ComponentMeta } from '@storybook/react' ;
3
+
4
+ import { ToggleSwitch } from './ToggleSwitch' ;
5
+
6
+ export default {
7
+ title : 'Octogonz/ToggleSwitch' ,
8
+ component : ToggleSwitch ,
9
+ argTypes : {
10
+ leftColor : { control : 'color' } ,
11
+ rightColor : { control : 'color' }
12
+ }
13
+ } as ComponentMeta < typeof ToggleSwitch > ;
14
+
15
+ const Template : ComponentStory < typeof ToggleSwitch > = ( args ) => < ToggleSwitch { ...args } /> ;
16
+
17
+ // eslint-disable-next-line
18
+ export const Primary : any = Template . bind ( { } ) ;
19
+ Primary . args = { } ;
20
+
21
+ // eslint-disable-next-line
22
+ export const Secondary : any = Template . bind ( { } ) ;
23
+ Secondary . args = { } ;
You can’t perform that action at this time.
0 commit comments