From 5e35289ae403ef2a7663831a57c106169648f014 Mon Sep 17 00:00:00 2001 From: alexsparkes Date: Mon, 16 Dec 2024 18:55:44 +0000 Subject: [PATCH] fix(slider): light theme styles --- .../Form/Settings/Slider/Slider.jsx | 47 +++++++++++-------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/src/components/Form/Settings/Slider/Slider.jsx b/src/components/Form/Settings/Slider/Slider.jsx index 6fe70a93..41eadd4e 100644 --- a/src/components/Form/Settings/Slider/Slider.jsx +++ b/src/components/Form/Settings/Slider/Slider.jsx @@ -2,7 +2,7 @@ import variables from 'config/variables'; import { useState } from 'react'; import { toast } from 'react-toastify'; import ReactSlider from 'react-slider'; -import { MdRefresh, MdSpeed } from 'react-icons/md'; +import { MdRefresh } from 'react-icons/md'; import EventBus from 'utils/eventbus'; function SliderComponent(props) { @@ -12,9 +12,7 @@ function SliderComponent(props) { const handleChange = (newValue) => { if (typeof newValue !== 'number') return; - newValue = Math.min(Math.max(newValue, props.min), props.max); - localStorage.setItem(props.name, newValue); setValue(newValue); @@ -47,18 +45,19 @@ function SliderComponent(props) { return (
- {props.title} + {props.title}
- + {value} {props.display}