diff --git a/frontend/src/components/ColorPicker/index.js b/frontend/src/components/ColorPicker/index.js
index fdd5dbd..0f9e0ba 100644
--- a/frontend/src/components/ColorPicker/index.js
+++ b/frontend/src/components/ColorPicker/index.js
@@ -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 (
-
+
+
);
};
diff --git a/frontend/src/components/QueueModal/index.js b/frontend/src/components/QueueModal/index.js
index b083993..95d84b2 100644
--- a/frontend/src/components/QueueModal/index.js
+++ b/frontend/src/components/QueueModal/index.js
@@ -19,7 +19,8 @@ import { i18n } from "../../translate/i18n";
import api from "../../services/api";
import toastError from "../../errors/toastError";
import ColorPicker from "../ColorPicker";
-import { InputAdornment } from "@material-ui/core";
+import { IconButton, InputAdornment } from "@material-ui/core";
+import { Colorize } from "@material-ui/icons";
const useStyles = makeStyles(theme => ({
root: {
@@ -71,6 +72,7 @@ const QueueModal = ({ open, onClose, queueId }) => {
greetingMessage: "",
};
+ const [colorPickerModalOpen, setColorPickerModalOpen] = useState(false);
const [queue, setQueue] = useState(initialState);
useEffect(() => {
@@ -116,13 +118,7 @@ const QueueModal = ({ open, onClose, queueId }) => {
return (
-
),
+ endAdornment: (
+ setColorPickerModalOpen(true)}
+ >
+
+
+ ),
}}
- name="color"
- error={touched.color && Boolean(errors.color)}
- helperText={touched.color && errors.color}
variant="outlined"
margin="dense"
/>
setColorPickerModalOpen(false)}
onChange={color => {
values.color = color;
- setQueue(prevState => {
- return { ...prevState, color };
+ setQueue(() => {
+ return { ...values, color };
});
}}
/>
diff --git a/frontend/src/pages/Queues/index.js b/frontend/src/pages/Queues/index.js
index 8abcbb3..e107486 100644
--- a/frontend/src/pages/Queues/index.js
+++ b/frontend/src/pages/Queues/index.js
@@ -37,7 +37,6 @@ const useStyles = makeStyles(theme => ({
},
customTableCell: {
display: "flex",
-
alignItems: "center",
justifyContent: "center",
},