File tree Expand file tree Collapse file tree 1 file changed +72
-1
lines changed
packages/react-renderer-demo/src/pages/provided-mappers Expand file tree Collapse file tree 1 file changed +72
-1
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,79 @@ const schema = {
34
34
]
35
35
} ;
36
36
37
+ const treeSchmea = {
38
+ fields : [
39
+ {
40
+ component : componentTypes . DUAL_LIST_SELECT ,
41
+ name : 'dual-list-select' ,
42
+ isTree : true ,
43
+ options : [
44
+ {
45
+ label : 'Animals' ,
46
+ hasBadge : true ,
47
+ badgeProps : {
48
+ isRead : true
49
+ } ,
50
+ children : [
51
+ {
52
+ value : 'lions' ,
53
+ label : 'Lions'
54
+ } ,
55
+ {
56
+ value : 'dogs' ,
57
+ label : 'Dogs'
58
+ } ,
59
+ {
60
+ label : 'Birds' ,
61
+ children : [
62
+ {
63
+ label : 'Pigeons' ,
64
+ value : 'pigens'
65
+ }
66
+ ]
67
+ }
68
+ ]
69
+ } ,
70
+ {
71
+ label : 'Cars' ,
72
+ children : [
73
+ {
74
+ value : 'suv' ,
75
+ label : 'SUVs'
76
+ } ,
77
+ {
78
+ value : 'hatchbacks' ,
79
+ label : 'Hatchbacks'
80
+ } ,
81
+ {
82
+ value : 'sedans' ,
83
+ label : 'Sedans'
84
+ } ,
85
+ {
86
+ label : 'Military' ,
87
+ children : [
88
+ {
89
+ label : 'Jeeps' ,
90
+ value : 'jeep'
91
+ }
92
+ ]
93
+ }
94
+ ]
95
+ }
96
+ ]
97
+ }
98
+ ]
99
+ } ;
100
+
37
101
const variants = [ ...baseFieldProps ] ;
38
102
39
- const DualListSelect = ( ) => < ComponentText schema = { schema } variants = { variants } linkText = "Dual list select" /> ;
103
+ const basicVariant = { schema, label : 'Basic' , value : 'basic' } ;
104
+ const treeVariant = { schema : treeSchmea , label : 'Tree' , value : 'tree' } ;
105
+
106
+ const schemaVariants = {
107
+ pf4 : [ basicVariant , treeVariant ]
108
+ } ;
109
+
110
+ const DualListSelect = ( ) => < ComponentText schema = { schema } variants = { variants } linkText = "Dual list select" schemaVariants = { schemaVariants } /> ;
40
111
41
112
export default DualListSelect ;
You can’t perform that action at this time.
0 commit comments