3
0

Col.js 629 B

123456789101112131415161718192021222324252627282930313233343536
  1. import React , { useState } from 'react';
  2. import { StyleSheet, Text, View, TextInput, Button } from 'react-native';
  3. export default class Col extends React.Component {
  4. constructor(props){
  5. super(props);
  6. }
  7. render() {
  8. let {
  9. children,
  10. selected,
  11. ...restProps
  12. } = this.props;
  13. let styl = [styles.column];
  14. if (selected) styl.push(styles.selected);
  15. return (
  16. <View {...restProps} style={styl}>
  17. {children}
  18. </View>
  19. );
  20. }
  21. }
  22. const styles = StyleSheet.create({
  23. column: {
  24. flex: 1,
  25. justifyContent: 'flex-start'
  26. },
  27. selected: {
  28. boxShadow: 'inset 0px 0px 1px 1px rgba(250,10,0,0.81)'
  29. }
  30. });