Button
Extends:
react-native~Component → Button
Button Component
Example:
<Subheader text="Light Theme"/>
<View style={styles.content}>
<Button value="NORMAL FLAT" primary={primary} onPress={()=> console.log(this.refs)}/>
<Button value="DISABLED FLAT" disabled={true} primary={primary}/>
<Button value="NORMAL RAISED" raised={true} primary={primary}/>
<Button value="DISABLED RAISED" disabled={true} raised={true} primary={primary}/>
</View>
<Subheader text="Dark Theme"/>
<View style={{
backgroundColor: COLOR.paperGrey900.color,
padding: 16,
}}>
<Button value="NORMAL FLAT" theme="dark" primary={primary}/>
<Button value="DISABLED FLAT" disabled={true} theme="dark" primary={primary}/>
<Button value="NORMAL RAISED" theme="dark" raised={true} primary={primary}/>
<Button value="DISABLED RAISED" disabled={true} theme="dark" raised={true} primary={primary}/>
</View>
Constructor Summary
Public Constructor | ||
public |
constructor(props: object) |
Public Constructors
public constructor(props: object) source
Params:
Name | Type | Attribute | Description |
props | object | ||
props.value | string | Button Text. If language is english, all letters should be capitalized. |
|
props.disabled | boolean |
|
if |
props.theme | enum(THEME_NAME) |
|
Button Theme |
props.primary | enum(COLOR_NAME) |
|
Primary color name |
props.raised | boolean |
|
Whether Button looks like raised or not. If in a Modal, should not be |
props.onPress | function |
|
Function will be triggered when click the Button |