Single State Button

February 1, 2017 ยท View on GitHub

Props

PropTypeDefaultNote
imageImageSource
textString
onPressFunction
statesObjectIf you pass the states object & the buttonState string into the ButtonComponent then the ButtonComponent will become a multiple states button.
The states object contain different button states each state is an object, the button state object can have the following state object attributes.
buttonStateStringRepresent the current button state.
widthNumbernull
HeightNumber50
typeStringprimary
shapeStringround
gradientStartObject{x: 0.5, y: 1}
gradientEndObject{x: 1, y: 1}
gradientLocationsArraynullexample: [0,0.5,0.6]
backgroundColorsArray['#4DC7A4', '#66D37A']
buttonStyleObject, Number['#4DC7A4', '#66D37A']

State Object Attributes

Button State Object Attributes - Progress

Progress Button State Object Attributes

Button State Object Attributes - Spinner

Spinner Button State Object Attributes

Button State Object Attributes - ALL

AttributeTypeDefaultNote
imageImageSource
text String
onPressFunction
buttonStateString
widthNumbernull
HeightNumber50
typeStringprimary
shapeStringround
gradientStartObject{x: 0.5, y: 1}
gradientEndObject{x: 1, y: 1}
backgroundColorsArray['#4DC7A4', '#66D37A']
buttonStyleObject, Number
imageAnimConfigObject
textAnimConfigObject
progressBoolean
progressStyleObject, Number
progressAnimConfigObject
progressSizeNumber
progressWidthNumber
progressFillNumber
progressTintColorString
progressBackgroundColorString
spinnerBoolean
spinnerStyleObject, Number
spinnerAnimConfigObject
spinnerSizeNumber
spinnerTypeString
spinnerColorString