From 4c82f5ba9591dd4db225492b0468845eb7f84da0 Mon Sep 17 00:00:00 2001 From: emyarod Date: Fri, 22 Mar 2019 10:56:40 -0500 Subject: [PATCH] refactor(Slider): replace Carbon TextInput --- src/components/Slider/Slider.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/components/Slider/Slider.js b/src/components/Slider/Slider.js index d19cf01741..e9041ecff1 100644 --- a/src/components/Slider/Slider.js +++ b/src/components/Slider/Slider.js @@ -10,7 +10,6 @@ import PropTypes from 'prop-types'; import classNames from 'classnames'; import isEqual from 'lodash.isequal'; import { settings } from 'carbon-components'; -import TextInput from '../TextInput'; import { sliderValuePropSync } from '../../internal/FeatureFlags'; import { componentsX } from '../../internal/FeatureFlags'; @@ -407,9 +406,14 @@ export default class Slider extends PureComponent { className ); - const inputClasses = classNames(`${prefix}--slider-text-input`, { - [`${prefix}--text-input--light`]: light, - }); + const inputClasses = classNames( + `${prefix}--text-input`, + `${prefix}--slider-text-input`, + { + [`${prefix}--text-input--light`]: light, + [`${prefix}--text-input--invalid`]: this.props.invalid, + } + ); const filledTrackStyle = { transform: `translate(0%, -50%) scaleX(${left / 100})`, @@ -483,7 +487,7 @@ export default class Slider extends PureComponent { {formatLabel(max, maxLabel)} {!hideTextInput && ( -