1
1
// Library
2
2
import React from 'react' ;
3
- import { View } from 'react-native' ;
4
- import { TextInput , Checkbox } from 'react-native-paper' ;
3
+ import { TextInput , Checkbox , Paragraph } from 'react-native-paper' ;
5
4
6
5
// Types
7
6
import { UIFramework } from './types/rnpaper-framework.type' ;
@@ -10,58 +9,82 @@ export const uiFramework: UIFramework = {
10
9
name : 'ReactNativePaper' ,
11
10
platform : 'mobile' ,
12
11
internal : {
13
- CrossPlatformWrapper : ( ) => ( < View / >) ,
14
- CrossPlatformLoadingWrapper : ( ) => ( < View / >) ,
15
- FormButtons : ( ) => ( < View / >) ,
16
- ValidationMessages : ( ) => ( < View / >) ,
12
+ CrossPlatformWrapper : ( { children } ) => ( < Paragraph > { children } </ Paragraph > ) ,
13
+ CrossPlatformLoadingWrapper : ( { children } ) => ( < Paragraph > { children } </ Paragraph > ) ,
14
+ FormButtons : ( { children } ) => ( < Paragraph > { children } </ Paragraph > ) ,
15
+ ValidationMessages : ( { children } ) => ( < Paragraph > { children } </ Paragraph > ) ,
17
16
} ,
18
17
wrapperComponents : {
19
- InputLabel : ( ) => ( < View / >) ,
20
- FormLabel : ( ) => ( < View / >) ,
21
- AppBar : ( ) => ( < View / >) ,
22
- Tabs : ( ) => ( < View / >) ,
23
- Tab : ( ) => ( < View / >) ,
24
- Box : ( ) => ( < View / >) ,
25
- CircularProgress : ( ) => ( < View / >) ,
26
- Typography : ( ) => ( < View / >) ,
27
- Divider : ( ) => ( < View / >) ,
28
- IconButton : ( ) => ( < View / >) ,
29
- AddCircle : ( ) => ( < View / >) ,
30
- Stepper : ( ) => ( < View / >) ,
31
- Step : ( ) => ( < View / >) ,
32
- StepLabel : ( ) => ( < View / >) ,
33
- Button : ( ) => ( < View / >) ,
34
- ArrowUpward : ( ) => ( < View / >) ,
35
- ArrowDownward : ( ) => ( < View / >) ,
36
- RemoveCircle : ( ) => ( < View / >) ,
37
- FormControl : ( ) => ( < View / >) ,
38
- FormGroup : ( ) => ( < View / >) ,
39
- FormHelperText : ( ) => ( < View / >) ,
40
- ActiveComp : ( ) => ( < View / >) ,
41
- Div : ( ) => ( < View / >) ,
42
- FieldsetHTML : ( ) => ( < View / >) ,
43
- Para : ( ) => ( < View / >)
18
+ InputLabel : ( { children } ) => ( < Paragraph > { children } </ Paragraph > ) ,
19
+ FormLabel : ( { children } ) => ( < Paragraph > { children } </ Paragraph > ) ,
20
+ AppBar : ( { children } ) => ( < Paragraph > { children } </ Paragraph > ) ,
21
+ Tabs : ( { children } ) => ( < Paragraph > { children } </ Paragraph > ) ,
22
+ Tab : ( { children } ) => ( < Paragraph > { children } </ Paragraph > ) ,
23
+ Box : ( { children } ) => ( < Paragraph > { children } </ Paragraph > ) ,
24
+ CircularProgress : ( { children } ) => ( < Paragraph > { children } </ Paragraph > ) ,
25
+ Typography : ( { children } ) => ( < Paragraph > { children } </ Paragraph > ) ,
26
+ Divider : ( { children } ) => ( < Paragraph > { children } </ Paragraph > ) ,
27
+ IconButton : ( { children } ) => ( < Paragraph > { children } </ Paragraph > ) ,
28
+ AddCircle : ( { children } ) => ( < Paragraph > { children } </ Paragraph > ) ,
29
+ Stepper : ( { children } ) => ( < Paragraph > { children } </ Paragraph > ) ,
30
+ Step : ( { children } ) => ( < Paragraph > { children } </ Paragraph > ) ,
31
+ StepLabel : ( { children } ) => ( < Paragraph > { children } </ Paragraph > ) ,
32
+ Button : ( { children } ) => ( < Paragraph > { children } </ Paragraph > ) ,
33
+ ArrowUpward : ( { children } ) => ( < Paragraph > { children } </ Paragraph > ) ,
34
+ ArrowDownward : ( { children } ) => ( < Paragraph > { children } </ Paragraph > ) ,
35
+ RemoveCircle : ( { children } ) => ( < Paragraph > { children } </ Paragraph > ) ,
36
+ FormControl : ( { children } ) => ( < Paragraph > { children } </ Paragraph > ) ,
37
+ FormGroup : ( { children } ) => ( < Paragraph > { children } </ Paragraph > ) ,
38
+ FormHelperText : ( { children } ) => ( < Paragraph > { children } </ Paragraph > ) ,
39
+ ActiveComp : ( { children } ) => ( < Paragraph > { children } </ Paragraph > ) ,
40
+ Div : ( { children } ) => ( < Paragraph > { children } </ Paragraph > ) ,
41
+ FieldsetHTML : ( { children } ) => ( < Paragraph > { children } </ Paragraph > ) ,
42
+ Para : ( { children } ) => ( < Paragraph > { children } </ Paragraph > )
44
43
} ,
45
44
components : {
46
45
string : {
47
- Input : TextInput ,
46
+ Input : ( props ) => < TextInput { ... props } /> ,
48
47
} ,
49
48
array : {
50
- select : TextInput ,
49
+ select : ( props ) => < TextInput { ... props } /> ,
51
50
} ,
52
51
boolean : {
53
- checkbox : Checkbox ,
52
+ checkbox : ( props ) => < Checkbox { ... props } /> ,
54
53
} ,
55
54
null : {
56
- emptyDiv : View ,
55
+ emptyDiv : Paragraph ,
57
56
} ,
58
57
} ,
59
58
styles : {
60
- FieldSetStyles : ( ) => { } ,
61
- FormFieldStyles : ( ) => { } ,
62
- FormStyles : ( ) => { } ,
59
+ FieldSetStyles : {
60
+ fieldSetContent : ( ) => ( {
61
+ root : ''
62
+ } ) ,
63
+ fieldSet : ( ) => ( {
64
+ root : ''
65
+ } ) ,
66
+ reorderControls : ( ) => ( {
67
+ root : ''
68
+ } ) ,
69
+ fieldSetObject : ( ) => ( {
70
+ root : ''
71
+ } )
72
+ } ,
73
+ FormFieldStyles : ( ) => ( {
74
+ root : '' ,
75
+ } ) ,
76
+ FormStyles : ( ) => ( {
77
+ root : '' ,
78
+ } ) ,
63
79
defaultTheme : ( ) => { } ,
64
- FieldStyles : ( ) => { } ,
80
+ FieldStyles : ( ) => ( {
81
+ root : '' ,
82
+ radioLabel : '' ,
83
+ normalLabel : '' ,
84
+ withLabel : '' ,
85
+ customLabel : '' ,
86
+ description : '' ,
87
+ } ) ,
65
88
FormStepperStyles : ( ) => { }
66
89
}
67
90
}
0 commit comments