Change how we render the shadow of every button, this style will apply to the main button and to every action button.
onPressItem: Function
Function to be called as soon as the user select an option from actions. Will return the name of the action.
onPressMain: Function
Function to be called as soon as use click main button and will return true or false depeneding of the state.
onPressBackdrop: Function
Function to be called as soon as the backdrop is clicked.
onClose: Function
Function to be called after set state to false.
onOpen: Function
Function to be called after set state to true.
onStateChange: Function
Function to be called after every state change. Will return state object.
animated: Boolean
Default:true
Enable the animation to be called after every state change. Will return state object.
actions Props
color: String
Default:'#1253bc'
Color of the action button.
iconColor: String
Default:'#ffffff'
Change default icon color
icon: Any
Icon to be rendered inside the action, will accept an URL or React.Image. If we want to send an URL we need to send it in this way: icon: { uri: 'https://imageurl.com' } if we want to send a React.Image we will use it in this way: icon: require('path/image').
name: String
Name of the icon, this name is used as parameter for onPressItem prop.
buttonSize: Number
Default:40
Size of of the action button.
text: String
Text to show near to the button. (Only apply for position = ['left', 'right']).
textStyle: Object | Array
Default:{ fontSize: 12 }
Style to update text size.
textBackground: String
Default:#ffffff
Background color for Text container.
textColor: String
Default:#444444
Text color for every action.
elevation: Number
*Deprecated! use textElevation instead!
textElevation: Number
Default:5
Elevation property (also modifies "shadowOffset" in iOS)
render: Function => React Node
Default:5
Custom render function for Action. If provided, other properties are not applicable. The provided function should return a React Node
margin: Number
Default:8
Additional margin for action. This property is useful when we want to override the current margin for example using custom render
size: Number
Default:40
Size of of the icon rendered inside the action
TODO
first implementation
example
add colors configurations
add more positions like left, center and right
support hide or show the component with an animation
请发表评论