Added colors to appointments BOD-393

This commit is contained in:
Patrick Fic
2020-09-23 11:35:14 -07:00
parent 6c2e0dad45
commit 1a89d683d7
30 changed files with 826 additions and 5 deletions

View File

@@ -0,0 +1,20 @@
import React, { forwardRef } from "react";
import { BlockPicker } from "react-color";
//To be used as a form element only.
const ColorPickerFormItem = ({ value, onChange, style, ...restProps }, ref) => {
const handleChangeComplete = (color) => {
if (onChange) onChange(color);
};
return (
<BlockPicker
{...restProps}
style={{ width: "100%", ...style }}
color={value}
triangle="hide"
onChangeComplete={handleChangeComplete}
/>
);
};
export default forwardRef(ColorPickerFormItem);