From 973934ce74a39c8611d279136555bb4d3e5d846f Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Fri, 2 Jun 2023 20:19:47 +0200 Subject: [PATCH] Created the ColorDialog.jsx --- .../components/ColorDialog/ColorDialog.jsx | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 client/src/common/components/Header/components/ColorDialog/ColorDialog.jsx diff --git a/client/src/common/components/Header/components/ColorDialog/ColorDialog.jsx b/client/src/common/components/Header/components/ColorDialog/ColorDialog.jsx new file mode 100644 index 0000000..34c80a9 --- /dev/null +++ b/client/src/common/components/Header/components/ColorDialog/ColorDialog.jsx @@ -0,0 +1,39 @@ +import {DialogContext, DialogProvider} from "@/common/contexts/Dialog"; +import {faCheck, faClose, faPalette} from "@fortawesome/free-solid-svg-icons"; +import {FontAwesomeIcon} from "@fortawesome/react-fontawesome"; +import {useContext} from "react"; +import "./styles.sass"; + +const Dialog = ({currentColor, setCurrentColor}) => { + const close = useContext(DialogContext); + + const colors = ["#E3703F", "#19AFE6", "#17F687", "#F259C7", "#F2C94C", + "#E33F3F", "#922AC3", "#2239B2", "#2B8024", "#73482F"]; + + return ( + <> +
+
+ +

Primärfarbe

+
+ close()}/> +
+ +
+ {colors.map((color) => ( +
setCurrentColor(color)}> + {currentColor === color && } +
+ ))} +
+ + ); +} + +export const ColorDialog = ({onClose, color, setColor}) => ( + + + +) \ No newline at end of file