From b4c7665c367134a1be9104bca76ed93a29bc2718 Mon Sep 17 00:00:00 2001 From: Shailesh Kumar Date: Mon, 24 Aug 2015 12:36:19 +0200 Subject: [PATCH 1/3] Added props to override underlineStyle when disabled --- src/text-field.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/text-field.jsx b/src/text-field.jsx index ba2a3e706afdaf..e543ab28abafa2 100644 --- a/src/text-field.jsx +++ b/src/text-field.jsx @@ -45,6 +45,7 @@ let TextField = React.createClass({ type: React.PropTypes.string, underlineStyle: React.PropTypes.object, underlineFocusStyle: React.PropTypes.object, + underlineDisabledStyle: React.PropTypes.object }, getDefaultProps() { @@ -180,6 +181,7 @@ let TextField = React.createClass({ styles.error = this.mergeAndPrefix(styles.error, props.errorStyle); styles.underline = this.mergeAndPrefix(styles.underline, props.underlineStyle); + styles.underlineAfter = this.mergeAndPrefix(styles.underlineAfter, props.underlineDisabledStyle); styles.floatingLabel = this.mergeStyles(styles.hint, { lineHeight: '22px', From a93002ddacfb4d2177262c9e33a683230541b075 Mon Sep 17 00:00:00 2001 From: Shailesh Kumar Date: Mon, 24 Aug 2015 13:41:21 +0200 Subject: [PATCH 2/3] Fixing eslint errors --- src/text-field.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/text-field.jsx b/src/text-field.jsx index e543ab28abafa2..65c9542bb5d1c5 100644 --- a/src/text-field.jsx +++ b/src/text-field.jsx @@ -45,7 +45,7 @@ let TextField = React.createClass({ type: React.PropTypes.string, underlineStyle: React.PropTypes.object, underlineFocusStyle: React.PropTypes.object, - underlineDisabledStyle: React.PropTypes.object + underlineDisabledStyle: React.PropTypes.object, }, getDefaultProps() { From 54ddc678a6aa0ce2aa815ad312ef729e8197eddb Mon Sep 17 00:00:00 2001 From: Shailesh Kumar Date: Mon, 24 Aug 2015 23:29:27 +0200 Subject: [PATCH 3/3] updated TextField docs with info for underlineDisabledStyle props --- .../app/components/pages/components/text-fields.jsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/src/app/components/pages/components/text-fields.jsx b/docs/src/app/components/pages/components/text-fields.jsx index 825e3baefb0158..ee163b1fee3782 100644 --- a/docs/src/app/components/pages/components/text-fields.jsx +++ b/docs/src/app/components/pages/components/text-fields.jsx @@ -115,6 +115,12 @@ let TextFieldsPage = React.createClass({ header: 'optional', desc: 'Override the inline-styles of the TextField\'s underline element when focussed.' }, + { + name: 'underlineDisabledStyle', + type: 'object', + header: 'optional', + desc: 'Override the inline-styles of the TextField\'s underline element when disabled.' + }, { name: 'type', type: 'string', @@ -224,6 +230,11 @@ let TextFieldsPage = React.createClass({ style={styles.textfield} hintText="Custom Underline Focus Color" underlineFocusStyle={{borderColor: Colors.amber900}} />
+