1- import React , { useCallback } from 'react' ;
1+ import React , { useCallback } from 'react' ;
22import XHRMock from 'xhr-mock' ;
3- import { storiesOf } from '@storybook/react' ;
3+ import { storiesOf } from '@storybook/react' ;
44import Grid from '../src/index' ;
55import TuiGrid from 'tui-grid' ;
6- import { actions } from '@storybook/addon-actions' ;
7- import { withKnobs , number , radios , button , object , array } from '@storybook/addon-knobs' ;
8- import { data } from './dummy-data' ;
6+ import { actions } from '@storybook/addon-actions' ;
7+ import { withKnobs , number , radios , button , object , array } from '@storybook/addon-knobs' ;
8+ import { data } from './dummy-data' ;
99import 'tui-grid/dist/tui-grid.css' ;
1010import 'tui-pagination/dist/tui-pagination.css' ;
1111
1212const columns = [
13- { header : 'Name' , name : 'name' } ,
14- { header : 'Artist' , name : 'artist' } ,
15- { header : 'Type' , name : 'type' , editor : 'text' } ,
16- { header : 'Release' , name : 'release' , editor : 'text' } ,
17- { header : 'Genre' , name : 'genre' , editor : 'text' }
13+ { header : 'Name' , name : 'name' } ,
14+ { header : 'Artist' , name : 'artist' } ,
15+ { header : 'Type' , name : 'type' , editor : 'text' } ,
16+ { header : 'Release' , name : 'release' , editor : 'text' } ,
17+ { header : 'Genre' , name : 'genre' , editor : 'text' }
1818] ;
1919
2020const stories = storiesOf ( 'Toast UI Grid' , module ) . addDecorator ( withKnobs ) ;
2121
22- stories . add ( 'Normal' , ( ) => < Grid columns = { columns } data = { data } header = { { height : 60 } } /> ) ;
22+ stories . add ( 'Normal' , ( ) => < Grid columns = { columns } data = { data } header = { { height : 60 } } /> ) ;
2323
2424stories . add ( 'Set Language' , ( ) => {
2525 const options = {
@@ -85,7 +85,7 @@ stories.add('Using Method', () => {
8585 }
8686
8787 handleClickAppend = ( ) => {
88- this . grid . appendRow ( { } , { at : 0 } ) ;
88+ this . grid . appendRow ( { } , { at : 0 } ) ;
8989 } ;
9090
9191 handleClickSort = ( ) => {
@@ -204,15 +204,17 @@ stories.add('dataSource', () => {
204204 withCredentials : false ,
205205 initialRequest : true ,
206206 api : {
207- readData : { url : 'api/readData' , method : 'GET' }
207+ readData : { url : 'api/readData' , method : 'GET' }
208208 }
209209 } ;
210210
211- return < Grid columns = { columns } pagination = { true } data = { dataSource } pageOptions = { { perPage : 3 } } /> ;
211+ return (
212+ < Grid columns = { columns } pagination = { true } data = { dataSource } pageOptions = { { perPage : 3 } } />
213+ ) ;
212214} ) ;
213215
214216stories . add ( 'hook' , ( ) => {
215- const condition = radios ( 'condition' , { true : 'true' , false : 'false' } , 'true' ) ;
217+ const condition = radios ( 'condition' , { true : 'true' , false : 'false' } , 'true' ) ;
216218 const ReactComponent = ( ) => {
217219 const onClick = useCallback ( ( ) => {
218220 console . log ( 'condition:' , condition ) ;
@@ -225,7 +227,7 @@ stories.add('hook', () => {
225227} ) ;
226228
227229stories . add ( 'change event based on condition' , ( ) => {
228- const condition = radios ( 'condition' , { true : 'true' , false : 'false' } , 'true' ) ;
230+ const condition = radios ( 'condition' , { true : 'true' , false : 'false' } , 'true' ) ;
229231
230232 return (
231233 < Grid
0 commit comments