Lens app source code (#119)

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
Signed-off-by: Cody Belcher <cody.t.belcher@gmail.com>
This commit is contained in:
Jari Kolehmainen authored and Cody Belcher committed 2020-04-16 11:23:35 -05:00
1 parent 492ea272d1
commit d057cb17c6
797 files changed
+73714 -215

No files matched your search

@@ -0,0 +1,41 @@
// Wrapper for <Slider/> component
// API docs: https://material-ui.com/lab/api/slider/
import "./slider.scss";
import React, { Component } from "react";
import { cssNames } from "../../utils";
import MaterialSlider, { SliderClassKey, SliderProps } from "@material-ui/core/Slider";
interface Props extends SliderProps {
className?: string;
}
const defaultProps: Partial<Props> = {
step: 1,
min: 0,
max: 100,
};
export class Slider extends Component<Props> {
static defaultProps = defaultProps as object;
private classNames: Partial<{ [P in SliderClassKey]: string }> = {
track: "track",
thumb: "thumb",
disabled: "disabled",
vertical: "vertical",
};
render() {
const { className, ...sliderProps } = this.props;
return (
<MaterialSlider
{...sliderProps}
classes={{
root: cssNames("Slider", className),
...this.classNames
}}
/>
)
}
}