Skip to content

Latest commit

 

History

History
61 lines (34 loc) · 789 Bytes

InputToggle.md

File metadata and controls

61 lines (34 loc) · 789 Bytes

InputToggle (component)

An basic input row with a label and Switch, allowing the user to toggle a boolean value.

Props

backgroundColor

type: string defaultValue: 'transparent'

editable

type: bool defaultValue: true

label (required)

type: string

onTintColor

defaultValue: 'success'

onValueChange (required)

type: func

style

type: any

value (required)

type: bool

Examples

Basic example with label and custom tint color

Input Toggle

import { InputToggle } from 'panza'

<InputToggle
  value={this.state.editable}
  onTintColor='warning'
  onValueChange={(editable) => this.setState({ editable })}
  label='Editable?'
/>