1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | import { __assign, __extends, __rest } from "tslib";
|
17 | import * as React from "react";
|
18 | import { AbstractPureComponent, Intent } from "../../common";
|
19 | import { DISPLAYNAME_PREFIX } from "../../common/props";
|
20 | import { MultiSlider } from "./multiSlider";
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 | var Slider = (function (_super) {
|
27 | __extends(Slider, _super);
|
28 | function Slider() {
|
29 | return _super !== null && _super.apply(this, arguments) || this;
|
30 | }
|
31 | Slider.prototype.render = function () {
|
32 | var _a = this.props, initialValue = _a.initialValue, intent = _a.intent, value = _a.value, onChange = _a.onChange, onRelease = _a.onRelease, handleHtmlProps = _a.handleHtmlProps, props = __rest(_a, ["initialValue", "intent", "value", "onChange", "onRelease", "handleHtmlProps"]);
|
33 | return (React.createElement(MultiSlider, __assign({}, props),
|
34 | React.createElement(MultiSlider.Handle, { value: value, intentAfter: value < initialValue ? intent : undefined, intentBefore: value >= initialValue ? intent : undefined, onChange: onChange, onRelease: onRelease, htmlProps: handleHtmlProps }),
|
35 | React.createElement(MultiSlider.Handle, { value: initialValue, interactionKind: "none" })));
|
36 | };
|
37 | Slider.defaultProps = __assign(__assign({}, MultiSlider.defaultSliderProps), { initialValue: 0, intent: Intent.PRIMARY, value: 0 });
|
38 | Slider.displayName = "".concat(DISPLAYNAME_PREFIX, ".Slider");
|
39 | return Slider;
|
40 | }(AbstractPureComponent));
|
41 | export { Slider };
|
42 |
|
\ | No newline at end of file |