|
3 | 3 | "prefix": "radioGroup",
|
4 | 4 | "description": "Wrap a group of Radio Buttons to automatically control their selection",
|
5 | 5 | "body": [
|
6 |
| - "<RadioGroup initialValue={this.state.value$1} onValueChange={() => console.log('value changed)$2}>", |
| 6 | + "<RadioGroup initialValue={this.state.value$1} onValueChange={() => console.log('value changed')$2}>", |
7 | 7 | " <RadioButton value={'yes'$3} label={'Yes'$4}/>",
|
8 | 8 | " <RadioButton value={'no'$5} label={'No'$6}/>",
|
9 | 9 | "</RadioGroup>"
|
|
41 | 41 | "prefix": "drawer",
|
42 | 42 | "description": "Drawer Component",
|
43 | 43 | "body": [
|
44 |
| - "<Drawer rightItems:{[{text: 'Read', onPress: () => console.log('read pressed')}, {text: 'Delete', onPress: () => console.log('delete pressed')}]}$1>", |
45 |
| - " <ListItem><Text grey10 text60 marginL-10>The item</Text></ListItem>$2", |
| 44 | + "<Drawer", |
| 45 | + " rightItems={[{text: 'Read', background: Colors.blue30, onPress: () => console.log('read pressed')}]$1}", |
| 46 | + " leftItem={{text: 'Delete', background: Colors.red30, onPress: () => console.log('delete pressed')}$2}", |
| 47 | + ">", |
| 48 | + " <View centerV padding-s4 bg-white style={{height: 60}}>", |
| 49 | + " <Text text70>Item</Text>", |
| 50 | + " </View>", |
46 | 51 | "</Drawer>"
|
47 | 52 | ]
|
48 | 53 | },
|
|
123 | 128 | "<Picker",
|
124 | 129 | " value={this.state.value$1}",
|
125 | 130 | " placeholder={'Placeholder'$2}",
|
126 |
| - " onChange={() => console.log('changed)$3}", |
| 131 | + " onChange={() => console.log('changed')$3}", |
127 | 132 | ">",
|
128 | 133 | " {_.map(items, item => (",
|
129 | 134 | " return this.renderItem(item, index);",
|
|
135 | 140 | "prefix": "floatingButton",
|
136 | 141 | "description": "Hovering button with gradient background",
|
137 | 142 | "body": [
|
138 |
| - "<FloatingButton visible={this.state.visible$1} button={button={{label: 'Approve', onPress: () => console.log('approved')}}$2}/>" |
| 143 | + "<FloatingButton visible={this.state.visible$1} button={{label: 'Approve', onPress: () => console.log('approved')}}$2}/>" |
139 | 144 | ]
|
140 | 145 | },
|
141 | 146 | "MaskedInput": {
|
|
151 | 156 | " visible={this.state.visible$1}",
|
152 | 157 | " position={'top'$2}",
|
153 | 158 | " autoDismiss={5000$2}",
|
154 |
| - " onDismiss={() => console.log('dismissed)$3}", |
| 159 | + " onDismiss={() => console.log('dismissed')$3}", |
155 | 160 | ">"
|
156 | 161 | ]
|
157 | 162 | },
|
158 | 163 | "Chip": {
|
159 | 164 | "prefix": "chip",
|
160 | 165 | "description": "Chip component",
|
161 |
| - "body": ["<Chip label={'Chip'$1} onPress={() => console.log('pressed’)$2}/>"] |
| 166 | + "body": ["<Chip label={'Chip'$1} onPress={() => console.log('pressed')$2}/>"] |
162 | 167 | },
|
163 | 168 | "Wizard.Step": {
|
164 | 169 | "prefix": "wizard.Step",
|
|
169 | 174 | "prefix": "wizard",
|
170 | 175 | "description": "A wizard presents a series of steps in prescribed order. That the user needs to complete in order to accomplish a goal (e.g. purchase a product)",
|
171 | 176 | "body": [
|
172 |
| - "<Wizard activeIndex={0$1} onActiveIndexChanged={() => console.log('changed)$2}>", |
| 177 | + "<Wizard activeIndex={0$1} onActiveIndexChanged={() => console.log('changed')$2}>", |
173 | 178 | " {_.map(items, item => (",
|
174 | 179 | " return this.renderItem(item, index);",
|
175 | 180 | " ))}",
|
|
183 | 188 | "<ColorPalette",
|
184 | 189 | " colors={['transparent', Colors.green30, Colors.yellow30, Colors.red30]$1}",
|
185 | 190 | " value={this.state.selectedColor$2}",
|
186 |
| - " onValueChange={() => console.log('value changed)$3}", |
| 191 | + " onValueChange={() => console.log('value changed')$3}", |
187 | 192 | "/>"
|
188 | 193 | ]
|
189 | 194 | },
|
190 | 195 | "Checkbox": {
|
191 | 196 | "prefix": "checkbox",
|
192 | 197 | "description": "Checkbox component for toggling boolean value related to some context",
|
193 |
| - "body": ["<Checkbox value={false$1} onValueChange={() => console.log('value changed’)$2}/>"] |
| 198 | + "body": ["<Checkbox value={false$1} onValueChange={() => console.log('value changed')$2}/>"] |
194 | 199 | },
|
195 | 200 | "TextField": {
|
196 | 201 | "prefix": "textField",
|
|
199 | 204 | "<TextField",
|
200 | 205 | " placeholder={'Placeholder$1}",
|
201 | 206 | " floatingPlaceholder",
|
202 |
| - " onChangeText={() => console.log('changed)$2}", |
| 207 | + " onChangeText={() => console.log('changed')$2}", |
203 | 208 | " enableErrors",
|
204 | 209 | " validate={['required', 'email', (value) => value.length > 6]$3}",
|
205 | 210 | " validationMessage={['Field is required', 'Email is invalid', 'Password is too short']$4}",
|
|
225 | 230 | "description": "Stack aggregator component",
|
226 | 231 | "body": [
|
227 | 232 | "<StackAggregator",
|
228 |
| - " onItemPress={() => console.log('pressed)$1}", |
| 233 | + " onItemPress={() => console.log('pressed')$1}", |
229 | 234 | ">",
|
230 | 235 | " {_.map(items, (item, index) => {",
|
231 | 236 | " return this.renderItem(item, index);",
|
|
271 | 276 | "prefix": "listItem",
|
272 | 277 | "description": "List item component to render inside a List component",
|
273 | 278 | "body": [
|
274 |
| - "<ListItem onPress={() => console.log('pressed)$1}>", |
| 279 | + "<ListItem onPress={() => console.log('pressed')$1}>", |
275 | 280 | " <Text grey10 text60 marginL-10>The item</Text>$2",
|
276 | 281 | "</ListItem>"
|
277 | 282 | ]
|
|
335 | 340 | "TouchableOpacity": {
|
336 | 341 | "prefix": "touchableOpacity",
|
337 | 342 | "description": "A wrapper for TouchableOpacity component. Support onPress, throttling and activeBackgroundColor",
|
338 |
| - "body": ["<TouchableOpacity onPress={() => console.log('pressed)$1}/>"] |
| 343 | + "body": ["<TouchableOpacity onPress={() => console.log('pressed')$1}/>"] |
339 | 344 | },
|
340 | 345 | "StateScreen": {
|
341 | 346 | "prefix": "stateScreen",
|
|
379 | 384 | "Switch": {
|
380 | 385 | "prefix": "switch",
|
381 | 386 | "description": "Switch component for toggling boolean value related to some context",
|
382 |
| - "body": ["<Switch value={false$1} onValueChange={() => console.log('value changed)$2}/>"] |
| 387 | + "body": ["<Switch value={false$1} onValueChange={() => console.log('value changed')$2}/>"] |
383 | 388 | },
|
384 | 389 | "DateTimePicker": {
|
385 | 390 | "prefix": "dateTimePicker",
|
|
441 | 446 | "prefix": "modal",
|
442 | 447 | "description": "Component that present content on top of the invoking screen",
|
443 | 448 | "body": [
|
444 |
| - "<Modal visible={this.state.visible$1} onBackgroundPress={() => console.log('background pressed)$3}>", |
| 449 | + "<Modal visible={this.state.visible$1} onBackgroundPress={() => console.log('background pressed')$3}>", |
445 | 450 | " <Text text60>Content</Text>$4",
|
446 | 451 | "</Modal>"
|
447 | 452 | ]
|
|
532 | 537 | "<WheelPicker",
|
533 | 538 | " items={[{label: 'Yes', value: 'yes'}, {label: 'No', value: 'no'}, {label: 'Maybe', value: 'maybe'}]$1}",
|
534 | 539 | " initialValue={'yes'$2}",
|
535 |
| - " onChange={() => console.log('changed’)$3}", |
| 540 | + " onChange={() => console.log('changed')$3}", |
536 | 541 | "/>"
|
537 | 542 | ]
|
538 | 543 | },
|
|
0 commit comments