import * as React from "react" ; import { Slider } from "@blueprintjs/core" ; import { ExampleCard } from "./ExampleCard" ; interface SliderExampleState { value ? : number ; } export class SliderExample extends React . PureComponent < Record < string , unknown > , SliderExampleState > { public state : SliderExampleState = { value : 5 , } ; private getChangeHandler ( key ) { return ( value ) => this . setState ( { [ key ] : value } ) ; } public render ( ) { return ( < div className = "example-row" > < ExampleCard label = "Slider" > < Slider min = { 0 } max = { 10 } stepSize = { 0.1 } labelStepSize = { 10 } onChange = { this . getChangeHandler ( "value" ) } value = { this . state . value } / > < Slider disabled = { true } min = { 0 } max = { 10 } stepSize = { 0.1 } labelStepSize = { 10 } value = { 5 } / > < /ExampleCard> < /div>); } }