From e35d9ca0809e8b42241972cfb23e5dba6a2794ea Mon Sep 17 00:00:00 2001 From: Furkan Date: Fri, 9 Jun 2017 15:06:05 +0300 Subject: [PATCH 1/4] Create Theme.js --- src/Theme.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Theme.js b/src/Theme.js index 265a2c8..625a0d5 100644 --- a/src/Theme.js +++ b/src/Theme.js @@ -19,7 +19,10 @@ const Theme = { labelSize: 9, labelWeight: 700, labelHeight: 25, - padding: '12 8' + paddingTop: 12, + paddingBottom: 12, + paddingLeft: 8, + paddingRight: 8, }, FormGroup: { borderColor: '#ebebeb', @@ -29,7 +32,10 @@ const Theme = { errorBorderColor: 'red', height: 35, marginBottom: 10, - padding: '0 10' + paddingTop: 0, + paddingBottom: 0, + paddingLeft: 10, + paddingRight: 10, }, BaseInput: { placeholderColor: '#c9c9c9', From c30b539ee616920bf403a5d6c73021a6d57d104b Mon Sep 17 00:00:00 2001 From: Furkan Date: Fri, 9 Jun 2017 15:08:50 +0300 Subject: [PATCH 2/4] Create FormGroup.js --- src/FormGroup.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/FormGroup.js b/src/FormGroup.js index d22c525..c4cd295 100644 --- a/src/FormGroup.js +++ b/src/FormGroup.js @@ -26,7 +26,7 @@ const calculateHeight = (props) => { } const FormGroupWrapper = styled.View` - align-items: ${props => props.inlineLabel ? 'center' : 'stretch' }; + align-items: ${props => props.inlineLabel ? 'center' : 'stretch' } border-color: ${props => props.error ? props.theme.FormGroup.errorBorderColor : props.theme.FormGroup.borderColor}; border-radius: ${props => props.theme.FormGroup.borderRadius}; border-style: ${props => props.theme.FormGroup.borderStyle}; @@ -35,7 +35,10 @@ const FormGroupWrapper = styled.View` justify-content: flex-start; height: ${props => calculateHeight(props)}; marginBottom: ${props => props.theme.FormGroup.marginBottom}; - padding: ${props => props.theme.FormGroup.padding}; + paddingTop : ${props => props.theme.FormGroup.paddingTop }; + paddingRight : ${props => props.theme.FormGroup.paddingRight }; + paddingBottom : ${props => props.theme.FormGroup.paddingBottom }; + paddingLeft : ${props => props.theme.FormGroup.paddingLeft }; ` FormGroupWrapper.defaultProps = { From dc20efb8e492425d4da1725e60273d6f0b03af79 Mon Sep 17 00:00:00 2001 From: Furkan Date: Fri, 9 Jun 2017 15:09:51 +0300 Subject: [PATCH 3/4] Create Fieldset.js --- src/Fieldset.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Fieldset.js b/src/Fieldset.js index c07e1ae..ce27797 100644 --- a/src/Fieldset.js +++ b/src/Fieldset.js @@ -19,7 +19,10 @@ const FieldsetLabel = props => { props.children } props.theme.Fieldset.borderBottomColor }; borderBottomWidth: ${props => props.last ? 0 : props.theme.Fieldset.borderBottomWidth }; - padding: ${props => props.theme.Fieldset.padding }; + paddingTop : ${props => props.theme.Fieldset.paddingTop }; + paddingRight : ${props => props.theme.Fieldset.paddingRight }; + paddingBottom : ${props => props.theme.Fieldset.paddingBottom }; + paddingLeft : ${props => props.theme.Fieldset.paddingLeft }; ` FieldsetWrapper.defaultProps = { From 824319a9ba3ecd475b3f00587fd4d5b16286004c Mon Sep 17 00:00:00 2001 From: Furkan Date: Fri, 9 Jun 2017 15:12:27 +0300 Subject: [PATCH 4/4] Update FormGroup.js --- src/FormGroup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FormGroup.js b/src/FormGroup.js index c4cd295..dadbc2a 100644 --- a/src/FormGroup.js +++ b/src/FormGroup.js @@ -26,7 +26,7 @@ const calculateHeight = (props) => { } const FormGroupWrapper = styled.View` - align-items: ${props => props.inlineLabel ? 'center' : 'stretch' } + align-items: ${props => props.inlineLabel ? 'center' : 'stretch' }; border-color: ${props => props.error ? props.theme.FormGroup.errorBorderColor : props.theme.FormGroup.borderColor}; border-radius: ${props => props.theme.FormGroup.borderRadius}; border-style: ${props => props.theme.FormGroup.borderStyle};