packageDocumentation module import "./SpeedTimeline.scss" ; import classnames from "classnames" ; import * as React from "react" ; import { Slider } from "@itwin/itwinui-react" ; import { CommonProps } from "@itwin/core-react" ; interface SpeedProps extends CommonProps { speed : number ; onChange ? : ( value : number ) => void ; } internal export function SpeedTimeline ( props ) { const onChange = ( values ) => { const value = values [ 0 ] ; if ( props . onChange && ( value >= 1 && value <= 6 ) ) props . onChange ( value ) ; } ; const tooltipProps = React . useCallback ( ( ) => { return { visible : false } ; } , [ ] ) ; return ( < div className = { classnames ( "speed-timeline" , props . className ) } > < Slider step = { 1 } min = { 1 } max = { 6 } minLabel = "" maxLabel = "" onUpdate = { onChange } onChange = { onChange } values = { [ props . speed ] } trackDisplayMode = "none" tooltipProps = { tooltipProps } / > < /div>); }