forked from MichaelCereda/react-native-form-generator
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSeparator.js
52 lines (45 loc) · 1.14 KB
/
Separator.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
'use strict';
import React from 'react';
let { View, StyleSheet, Text} = require('react-native');
export class Separator extends React.Component{
shouldComponentUpdate(nextProps, nextState) {
return this.props !== nextProps || this.state !== nextState
}
render(){
return(<View style={[formStyles.separatorContainer, this.props.containerStyle]}>
{
(this.props.label)?
<Text style={[formStyles.separator,this.props.labelStyle]}>{this.props.label}</Text>
: null
}
</View>
)
}
}
let formStyles = StyleSheet.create({
form:{
},
alignRight:{
marginTop: 7, position:'absolute', right: 10
},
separatorContainer:{
// borderTopColor: '#C8C7CC',
// borderTopWidth: 1,
paddingTop: 35,
// borderBottomColor: '#C8C7CC',
// borderBottomWidth: 1,
},
separator:{
paddingLeft: 10,
paddingRight: 10,
color: '#6D6D72',
paddingBottom: 7
},
fieldContainer:{
// borderBottomWidth: 1,
// borderBottomColor: '#C8C7CC',
backgroundColor: 'white',
justifyContent: 'center',
height: 45
},
});