UNPKG

@yandex/ui

Version:

Yandex UI components

11 lines (10 loc) 893 B
import { __assign } from "tslib"; import React from 'react'; import { Slider, useSliderState } from '@yandex-lego/components/Slider/desktop/bundle'; export var CustomLabelTick = function () { var state1 = useSliderState({ value: [20] }); var state2 = useSliderState({ value: [20, 50] }); return (React.createElement(React.Fragment, null, React.createElement(Slider, __assign({ filled: true, showTickValues: true, step: 10, view: "default" }, state1, { renderTickLabel: function (props, LabelTick) { return (props.index % 2 === 0 ? React.createElement(LabelTick, __assign({}, props)) : null); } })), React.createElement(Slider, __assign({ filled: true, showTickValues: true, step: 10, view: "default" }, state2, { renderTickLabel: function (props, LabelTick) { return (props.index % 2 === 0 ? React.createElement(LabelTick, __assign({}, props)) : null); } })))); };