import React from 'react'; import PropTypes from 'prop-types'; import Slider, { Range } from 'rc-slider'; import colors from './../../../colors'; import { Form, FormGroup, Card, CardBody, CardTitle, Label, Input, Button, Row, Col, Container } from './../../../components'; import { HeaderMain } from "../../components/HeaderMain"; import { HeaderDemo } from "../../components/HeaderDemo"; import classes from './Sliders.scss'; const marks = { '-10': '-10°C', 0: 0°C, 26: '26°C', 37: '37°C', 50: '50°C', 100: { style: { color: colors['danger'], }, label: 100°C, }, } class CustomizedRange extends React.Component { constructor(props) { super(props); this.state = { lowerBound: 20, upperBound: 40, value: [20, 40] }; } onLowerBoundChange(e) { this.setState({ lowerBound: +e.target.value }); } onUpperBoundChange(e) { this.setState({ upperBound: +e.target.value }); } onSliderChange(value) { this.setState({ value, }); } handleApply() { const { lowerBound, upperBound } = this.state; this.setState({ value: [lowerBound, upperBound] }); } render() { return (
Slider with marks, step=null
Slider with marks, included=false
Slider with marks and steps
Slider with marks and steps, included=false
Range with marks
Range with marks and steps
Basic Range,allowCross=false
Basic Range,disabled
Basic Range,step=20
Basic Range,step=20, dots
Controlled Range
Multi Range
Customized Range
Range with dynamic max
min
Basic Slider
Basic Slider, disabled
Basic Slider,step=20
Basic Slider,step=20, dots
Controlled Slider
Customized Slider
Slider with dynamic min
, max
Slider with marks, step=null
Slider with marks and steps
Slider with marks, included=false
Slider with marks and steps, included=false
Range with marks
Range with marks and steps