Bin
2025-12-16 9e0b2ba2c317b1a86212f24cbae3195ad1f3dbfa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import { Component, Fragment } from "react";
import { Dropdown, Menu, Slider } from "antd";
import { Button, IconRefresh } from "@humansignal/ui";
import { observer } from "mobx-react";
 
import styles from "./Styles.module.scss";
 
export default observer(
  class SliderDropDownTool extends Component {
    render() {
      const menu = (
        <Menu>
          <Menu.Item key="1">
            <Slider
              defaultValue={this.props.default || 15}
              max={this.props.max || 50}
              value={this.props.value}
              min={0}
              vertical
              tipFormatter={null}
              style={{ height: this.props.height || 100 }}
              onChange={this.props.onChange}
            />
            <Button
              variant={this.props.selected ? "primary" : "neutral"}
              className={styles.button}
              onClick={this.props.onResetClick}
            >
              <IconRefresh />
            </Button>
          </Menu.Item>
        </Menu>
      );
 
      return (
        <Fragment>
          <Dropdown overlay={menu}>
            <Button className={styles.button} aria-label="Slider options">
              {this.props.icon}
            </Button>
          </Dropdown>
        </Fragment>
      );
    }
  },
);