A generic button component used for the user to click on to perform an action.
Props
Name
Required
Nullable
Type
children
React.Node
activeColor
string
constrainSize
boolean
defaultColor
string
disabled
boolean
disabledColor
string
disabledStyle
{}
hoverColor
string
onPress
() ⇒ void | Promise<void>
onPressIn
() ⇒ void | Promise<void>
onPressOut
() ⇒ void | Promise<void>
size
"small" | "medium" | "large"
style
{ [key: string]: any }
textColor
string
textStyle
{}
Examples
Sizes
Small Button
Medium Button
Large Button
() => ( <FlexRow alignItems="flex-end"> <Button size="small" style={{ marginRight: 10 }}> Small Button </Button> <Button size="medium" style={{ marginRight: 10 }}> Medium Button </Button> <Button size="large">Large Button</Button> </FlexRow> )
Disabled State
Hello!
() => <Button disabled>Hello!</Button>
Loading State
Click me!
() => <Button onPress={resolveIn(1000)}>Click me!</Button>