File tree Expand file tree Collapse file tree 3 files changed +8
-15
lines changed Expand file tree Collapse file tree 3 files changed +8
-15
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ export const BasicUsage = () => {
28
28
</ DSVImport >
29
29
) ;
30
30
} ;
31
- BasicUsage . story = { name : 'Basic usage' , parameters : { docs : { storyDescription : 'Hello' } } } ;
31
+ BasicUsage . story = { name : 'Basic usage' } ;
32
32
33
33
export const UsingOnChangeCallback = ( ) => {
34
34
const columns : ColumnType < BasicType > [ ] = [
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ import { createValidatorMiddleware } from './middlewares/validatorMiddleware';
8
8
import { ValidationError } from './models/validation' ;
9
9
import { createTransformerMiddleware } from './middlewares/transformerMiddleware' ;
10
10
import { Transformer } from './models/transformer' ;
11
+ import { TextareaInput } from './components/inputs/TextareaInput' ;
12
+ import { TablePreview } from './components/previews/TablePreview' ;
11
13
12
14
interface EventListenerProps < T > {
13
15
onChange ?: ( value : T [ ] ) => void ;
@@ -52,7 +54,7 @@ export type Props<T> = {
52
54
} ;
53
55
54
56
/**
55
- * Hello
57
+ * This is the main component, which creates a context for it's children. All children can access the information of the `DSVImport`.
56
58
*/
57
59
export function DSVImport < T extends GenericColumnType > ( props : PropsWithChildren < Props < T > > ) {
58
60
const DSVImportContext = getDSVImportContext < T > ( ) ;
@@ -73,3 +75,6 @@ export function DSVImport<T extends GenericColumnType>(props: PropsWithChildren<
73
75
</ DSVImportContext . Provider >
74
76
) ;
75
77
}
78
+
79
+ DSVImport . TextareaInput = TextareaInput ;
80
+ DSVImport . TablePreview = TablePreview ;
Original file line number Diff line number Diff line change 1
- import { PropsWithChildren } from 'react' ;
2
- import { DSVImport as Import , Props } from './DSVImport' ;
3
- import { GenericColumnType } from './models/column' ;
4
- import { TextareaInput } from './components/inputs/TextareaInput' ;
5
- import { TablePreview } from './components/previews/TablePreview' ;
6
-
7
- export function DSVImport < T extends GenericColumnType > ( props : PropsWithChildren < Props < T > > ) {
8
- return Import < T > ( props ) ;
9
- }
10
-
11
- DSVImport . TextareaInput = TextareaInput ;
12
- DSVImport . TablePreview = TablePreview ;
13
-
1
+ export { DSVImport } from './DSVImport' ;
14
2
export { ColumnType , GenericColumnType } from './models/column' ;
15
3
export { useDSVImport } from './features/context' ;
16
4
export { Rule } from './models/rule' ;
You can’t perform that action at this time.
0 commit comments