import React from "react"; import RcSlider, { SliderProps, SliderRef } from 'rc-slider/lib/Slider'; import { PLAYBACK_SLOTS } from "./config"; // use workaround from: https://github.com/react-component/slider/issues/835#issuecomment-1201805736 const CustomSlider = RcSlider as React.ForwardRefExoticComponent & React.RefAttributes>; interface GeshemSliderProps { playback?: string, slider: number, setSlider: React.Dispatch> } export function Slider({ playback, slider, setSlider }: GeshemSliderProps) { const handleStyle = { height: 40, width: 40, border: 0, marginTop: -10, boxShadow: ".5px .5px 2px 1px rgba(0,0,0,.32)" }; const railStyle = { height: 20, backgroundColor: "#3498db" }; const trackStyle = { display: "none" }; return (
setSlider(val)} />
); }