mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-19 04:09:26 +00:00
feat: start adding queues page
This commit is contained in:
25
frontend/src/components/ColorPicker/index.js
Normal file
25
frontend/src/components/ColorPicker/index.js
Normal file
@@ -0,0 +1,25 @@
|
||||
import React, { useState } from "react";
|
||||
|
||||
import { GithubPicker } from "react-color";
|
||||
|
||||
const ColorPicker = ({ onChange, currentColor }) => {
|
||||
const [color, setColor] = useState(currentColor);
|
||||
|
||||
const handleChange = color => {
|
||||
setColor(color.hex);
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
<GithubPicker
|
||||
width={"100%"}
|
||||
triangle="hide"
|
||||
color={color}
|
||||
onChange={handleChange}
|
||||
onChangeComplete={color => onChange(color.hex)}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default ColorPicker;
|
||||
Reference in New Issue
Block a user