From efb3f9b992358896b4b7e5704e5e5bb5196b394a Mon Sep 17 00:00:00 2001 From: Frederico De Paoli Date: Fri, 5 Oct 2018 14:58:23 -0400 Subject: [PATCH] only adds "input:not(.form-control)" styling if there is no form control and no "input" prop provided; corrects label of input:not(.form-control) to describe input without form-control class --- dist/react-numeric-input.js | 4 ++-- docs/react-numeric-input.js | 4 ++-- index.js | 2 +- src/NumericInput.jsx | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dist/react-numeric-input.js b/dist/react-numeric-input.js index 52df137..6a8f66a 100644 --- a/dist/react-numeric-input.js +++ b/dist/react-numeric-input.js @@ -792,7 +792,7 @@ return /******/ (function(modules) { // webpackBootstrap } }, type: 'text', - style: noStyle ? null : _extends({}, css.input, !hasFormControl ? css['input:not(.form-control)'] : {}, this._inputFocus ? css['input:focus'] : {}) + style: noStyle ? null : _extends({}, css.input, !hasFormControl && !style.input ? css['input:not(.form-control)'] : {}, this._inputFocus ? css['input:focus'] : {}) }, rest), btnUp: { onMouseEnter: undefined, @@ -1231,7 +1231,7 @@ return /******/ (function(modules) { // webpackBootstrap fontSize: 'inherit' }, - // The input with bootstrap class + // The input without bootstrap class 'input:not(.form-control)': { border: '1px solid #ccc', borderRadius: 2, diff --git a/docs/react-numeric-input.js b/docs/react-numeric-input.js index 52df137..6a8f66a 100644 --- a/docs/react-numeric-input.js +++ b/docs/react-numeric-input.js @@ -792,7 +792,7 @@ return /******/ (function(modules) { // webpackBootstrap } }, type: 'text', - style: noStyle ? null : _extends({}, css.input, !hasFormControl ? css['input:not(.form-control)'] : {}, this._inputFocus ? css['input:focus'] : {}) + style: noStyle ? null : _extends({}, css.input, !hasFormControl && !style.input ? css['input:not(.form-control)'] : {}, this._inputFocus ? css['input:focus'] : {}) }, rest), btnUp: { onMouseEnter: undefined, @@ -1231,7 +1231,7 @@ return /******/ (function(modules) { // webpackBootstrap fontSize: 'inherit' }, - // The input with bootstrap class + // The input without bootstrap class 'input:not(.form-control)': { border: '1px solid #ccc', borderRadius: 2, diff --git a/index.js b/index.js index 4133bba..9dd929f 100644 --- a/index.js +++ b/index.js @@ -534,7 +534,7 @@ module.exports = } }, type: 'text', - style: noStyle ? null : _extends({}, css.input, !hasFormControl ? css['input:not(.form-control)'] : {}, this._inputFocus ? css['input:focus'] : {}) + style: noStyle ? null : _extends({}, css.input, !hasFormControl && !style.input ? css['input:not(.form-control)'] : {}, this._inputFocus ? css['input:focus'] : {}) }, rest), btnUp: { onMouseEnter: undefined, diff --git a/src/NumericInput.jsx b/src/NumericInput.jsx index 3aee95a..b096161 100644 --- a/src/NumericInput.jsx +++ b/src/NumericInput.jsx @@ -270,7 +270,7 @@ class NumericInput extends Component fontSize : 'inherit' }, - // The input with bootstrap class + // The input without bootstrap class 'input:not(.form-control)': { border : '1px solid #ccc', borderRadius : 2, @@ -894,7 +894,7 @@ class NumericInput extends Component style: noStyle ? null : Object.assign( {}, css.input, - !hasFormControl ? + !hasFormControl && !style.input ? css['input:not(.form-control)'] : {}, this._inputFocus ? css['input:focus'] : {}