@uiw/react-native
Version:
UIW for React Native
36 lines (34 loc) • 736 B
JavaScript
import React from 'react';
import { View, StyleSheet } from 'react-native';
import Button from '../Button';
export default class RightButton extends React.PureComponent {
constructor(props) {
super(props);
this.state = {};
}
render() {
const {
isShow = false,
actionName = '搜索',
width,
...other
} = this.props;
return <View style={[styles.rightStyle, {
width: width - 10,
opacity: Number(isShow)
}]}>
<Button type="primary" {...other} style={{
flex: 1,
paddingHorizontal: 10
}}>
{actionName}
</Button>
</View>;
}
}
const styles = StyleSheet.create({
rightStyle: {
marginLeft: 10,
height: 40
}
});