1
1
import React , { useState } from 'react' ;
2
- import { DSVImport , ColumnsType } from './' ;
2
+ import { DSVImport , ColumnType } from './' ;
3
3
import { action } from '@storybook/addon-actions' ;
4
4
import styled from '@emotion/styled' ;
5
5
@@ -8,7 +8,7 @@ export default { title: 'Usage|Examples' };
8
8
type BasicType = { forename : string ; surname : string ; email : string } ;
9
9
10
10
export const BasicUsage = ( ) => {
11
- const columns : ColumnsType < BasicType > = [
11
+ const columns : ColumnType < BasicType > [ ] = [
12
12
{ key : 'forename' , label : 'Forename' } ,
13
13
{ key : 'surname' , label : 'Surname' } ,
14
14
{ key : 'email' , label : 'Email' }
@@ -25,7 +25,7 @@ export const BasicUsage = () => {
25
25
BasicUsage . story = { name : 'Basic usage' } ;
26
26
27
27
export const UsingOnChangeCallback = ( ) => {
28
- const columns : ColumnsType < BasicType > = [
28
+ const columns : ColumnType < BasicType > [ ] = [
29
29
{ key : 'forename' , label : 'Forename' } ,
30
30
{ key : 'surname' , label : 'Surname' } ,
31
31
{ key : 'email' , label : 'Email' }
@@ -58,7 +58,7 @@ const CustomTablePreview = styled(DSVImport.TablePreview)`
58
58
` ;
59
59
60
60
export const UsingOnValidationCallback = ( ) => {
61
- const columns : ColumnsType < BasicType > = [
61
+ const columns : ColumnType < BasicType > [ ] = [
62
62
{ key : 'forename' , label : 'Forename' } ,
63
63
{ key : 'surname' , label : 'Surname' } ,
64
64
{ key : 'email' , label : 'Email' , rules : [ { constraint : { unique : true } , message : 'Duplicates are not allowed' } ] }
0 commit comments