import React from 'react'; import { Checkbox, Slider, SliderOnChangeEvent, Content } from '@patternfly/react-core'; export const SliderContinuous: React.FunctionComponent = () => { const [hasTooltipOverThumb, setHasTooltipOverThumb] = React.useState(false); const [value, setValue] = React.useState(50); const [valueCustom, setValueCustom] = React.useState(50); return ( <> , checked: boolean) => setHasTooltipOverThumb(checked)} style={{ marginBottom: 20 }} /> Slider Value is: {value} setValue(value)} />
Slider value is: {valueCustom} setValueCustom(value)} value={valueCustom} areCustomStepsContinuous hasTooltipOverThumb={hasTooltipOverThumb} customSteps={[ { value: 0, label: '0%' }, { value: 100, label: '100%' } ]} /> ); };