react-native-portableView
v0.0.2
Published
this is a Component that can change the order of children component in itself.
Downloads
1
Maintainers
Readme
PortibleView
this is a Component that can change the order of children component in itself.
Demo
Installation
npm install react-native-portableView -save
Documentaion
Usage
import Button from 'react-native-animated-button';
class Demo extends Component {
render() {
return (
<Button/>
)
}
}
Examples
<Button
style={{marginTop:10,alignSelf:'center', height: 55,width:80, backgroundColor: 'white', borderWidth: 1 / PixelRatio.get(), borderColor: '#0033FF', borderRadius: 5}}
imageStyle={{height:50,width:50}}
activeStyle={{marginTop:10,alignSelf:'center',height: 55,width:100, backgroundColor: 'white', borderWidth: 1 / PixelRatio.get(), borderColor: '#0033FF', borderRadius: 5}}
source={require('./jpg/head.jpg')}
text="左⬅️️"
animated={true}
type="iconLeft"
onLongPress={() => {
console.log('onLongPress...');
}}
onPress={() => {
console.log('onPress...');
}}
onPressIn={() => {
console.log('onPressIn...');
}}
onPressOut={() => {
console.log('onPressOut...');
}}
>
Props
animated
(Boolean)false
- animated or not for Buttonanimations
(Object) animations for the style of Button from unactive to activeonPressIn
(Function) callback when pressinonPressOut
(Function) callback when pressouttype
(Oneof:(['iconLeft', 'iconRight', 'iconTop', 'iconBottom']))iconBottom
- the relative position for Image and Textstyle
(Style) - style of the Button which is unactiveactiveStyle
(Style) - style of the Text which is activetext
(String) - text in ButtonactiveText
(String) - text when Button is activefontStyle
(Style) - style of the Text which is unactiveactiveFontStyle
(Style) - style of the Text which is activesource
(Source) - source of Image which is unactiveactiveSource
(Source) - source of Image which is activeimageStyle
(Style) - style of the Image which is unactiveactiveImageStyle
(Style) - style of the Image which is unactive