Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const styles = StyleSheet.create({
- ...
- swipeButtonCommon:{
- backgroundColor: Color.listActionBackground
- },
- ...
- })
- function SwipeButton(title:string, side: 'left' | 'center' | 'right'){
- let styleClass: string | null = null;
- if(side == 'left'){
- styleClass = 'swipeButtonLeft';
- }else if(side == 'right'){
- styleClass = 'swipeButtonRight'
- }
- return (
- <View style={[styles.swipeButtonCommon, styles[styleClass!]]}><Text>{title}</Text></View>
- )
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement