mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-18 19:59:20 +00:00
fix: queue color picker not working
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import { Dialog } from "@material-ui/core";
|
||||
import React, { useState } from "react";
|
||||
|
||||
import { GithubPicker } from "react-color";
|
||||
|
||||
const ColorPicker = ({ onChange, currentColor }) => {
|
||||
const ColorPicker = ({ onChange, currentColor, handleClose, open }) => {
|
||||
const [color, setColor] = useState(currentColor);
|
||||
|
||||
const handleChange = color => {
|
||||
@@ -10,7 +11,11 @@ const ColorPicker = ({ onChange, currentColor }) => {
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Dialog
|
||||
onClose={handleClose}
|
||||
aria-labelledby="simple-dialog-title"
|
||||
open={open}
|
||||
>
|
||||
<GithubPicker
|
||||
width={"100%"}
|
||||
triangle="hide"
|
||||
@@ -18,7 +23,7 @@ const ColorPicker = ({ onChange, currentColor }) => {
|
||||
onChange={handleChange}
|
||||
onChangeComplete={color => onChange(color.hex)}
|
||||
/>
|
||||
</div>
|
||||
</Dialog>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user