From 451391bcdb771e2537f9163a2aee56d23c91b5d2 Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Thu, 5 Dec 2024 11:00:34 +0900 Subject: [PATCH] [Update/Refactor] UI: Slider component. Adjust color and code. --- src-ui/app/_index_css/variables.css | 2 ++ .../setting_box/_components/slider/Slider.jsx | 27 +++++-------------- .../_components/slider/Slider.module.scss | 26 +++--------------- 3 files changed, 13 insertions(+), 42 deletions(-) diff --git a/src-ui/app/_index_css/variables.css b/src-ui/app/_index_css/variables.css index 652f1cd7..f4d235a4 100644 --- a/src-ui/app/_index_css/variables.css +++ b/src-ui/app/_index_css/variables.css @@ -16,6 +16,8 @@ --primary_800_color: #2c6759; --primary_900_color: #214b3f; + --primary_600_color_44: #36877744; + --sent_400_color: #6197b4; --received_300_color: #a861b4; diff --git a/src-ui/app/config_page/setting_section/setting_box/_components/slider/Slider.jsx b/src-ui/app/config_page/setting_section/setting_box/_components/slider/Slider.jsx index 7f96bd86..504aa03e 100644 --- a/src-ui/app/config_page/setting_section/setting_box/_components/slider/Slider.jsx +++ b/src-ui/app/config_page/setting_section/setting_box/_components/slider/Slider.jsx @@ -1,22 +1,9 @@ -import React, { useState, useEffect } from "react"; +import React from "react"; import styles from "./Slider.module.scss"; import MUI_Slider from "@mui/material/Slider"; import { clsx } from "clsx"; export const Slider = (props) => { - const [baseColor, setBaseColor] = useState(""); - const [activeColor, setActiveColor] = useState(""); - const [toolTipColor, setToolTipColor] = useState(""); - - useEffect(() => { - const baseColor = getComputedStyle(document.documentElement).getPropertyValue("--dark_700_color"); - setBaseColor(baseColor.trim()); - const activeColor = getComputedStyle(document.documentElement).getPropertyValue("--primary_600_color"); - setActiveColor(activeColor.trim()); - const toolTipColor = getComputedStyle(document.documentElement).getPropertyValue("--dark_800_color"); - setToolTipColor(toolTipColor.trim()); - }, []); - return (