Components

Components are stateless rect elements. They render what you pass to them and call function as callbacks. Components are essential part of the app. Here's the list of available components:

Button

Regular Button can be rendered like this:

<Button
  style={styles.demoButton}
  primary
  caption="Button"
  onPress={this.buttonClicked}
/>

Button component takes the following props:

Radio Group

Renders a tab-style radio group.

Can be rendered:

<RadioGroup
  style={styles.demoItem}
  items={['One', 'Two', 'Three']}
  selectedIndex={props.radioGroupsState[0]}
  onChange={index => props.setRadioGroupsState({ ...props.radioGroupsState, 0: index })}
/>

Component's props:

Use the dropdown this way:

<Dropdown
  onSelect={() => {}}
  items={['option 1', 'option 2']}
/>

Dropdown's props:

Last updated