Skip to content
This repository has been archived by the owner on Oct 19, 2021. It is now read-only.

Commit

Permalink
fix(Slider): match vanilla markup
Browse files Browse the repository at this point in the history
  • Loading branch information
emyarod committed Jan 22, 2019
1 parent ecdcea0 commit 6d88eed
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/components/Slider/Slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import isEqual from 'lodash.isequal';
import { settings } from 'carbon-components';
import TextInput from '../TextInput';
import { sliderValuePropSync } from '../../internal/FeatureFlags';
import { componentsX } from '../../internal/FeatureFlags';

const { prefix } = settings;

Expand Down Expand Up @@ -417,6 +418,11 @@ export default class Slider extends PureComponent {
{labelText}
</label>
<div className={`${prefix}--slider-container`}>
{componentsX && (
<span className={`${prefix}--slider__range-label`}>
{formatLabel(min, minLabel)}
</span>
)}
<div
className={sliderClasses}
ref={node => {
Expand Down Expand Up @@ -462,9 +468,11 @@ export default class Slider extends PureComponent {
onChange={this.handleChange}
/>
</div>
<span className={`${prefix}--slider__range-label`}>
{formatLabel(min, minLabel)}
</span>
{!componentsX && (
<span className={`${prefix}--slider__range-label`}>
{formatLabel(min, minLabel)}
</span>
)}
<span className={`${prefix}--slider__range-label`}>
{formatLabel(max, maxLabel)}
</span>
Expand Down

0 comments on commit 6d88eed

Please sign in to comment.