import { ColorContext, ColorSelectionType, } from "@/app/context/Context"; import { Button, Dialog, DialogActions, DialogContent, DialogTitle, Tooltip, Typography, } from "@mui/material"; import { ColorChangeHandler, ColorResult, CompactPicker } from "react-color"; import React from "react"; import { useContext } from "react"; export const SettingsButton = () => { const { colors, setColors } = useContext(ColorContext); const [open, setOpen] = React.useState(false); const handleClickOpen = () => { setOpen(true); }; const handleClose = () => { setOpen(false); }; const handleColorSelection = (key: string, currentColors: ColorSelectionType) => (selection: ColorResult) => { console.log(key, selection.hex) setColors({ ...currentColors, [key]: selection.hex }) }; return ( <> {"Override default timer colors"} {Object.keys(colors).map((key) => { return (
{key}
); })}
); };