react-colorful
react-colorful copied to clipboard
HexColorInput
For those that use UI frameworks (i.e. MUI), it would be nice if the HexColorInput could allow the rendering to be outsource to the UI framework input, with the logic of HexColorInput being a hook/decorator.
Or alternatively, I am ok to build my own input component by using the HexColorInput component as a guide, but to to do that it would be great if that component's interfaces were accessible publicly.
i.e.
import { ColorInputBaseProps } from "../types";
import { validHex } from "../utils/validate";
import { ColorInput } from "./common/ColorInput";
Hi! That's actually a great idea and I definitely should implement something like const props = useHexColorInput()
👍
Running into this problem, too 😄
i have the same problem
Related request here, I would like to overrule e.g. the validate
from HexColorInput
(to only allow #rrggbb).
But as the {...rest}
is spread in the beginning, I cannot hack this around (as it is not defined in the TS interface).
Would be nice to export the ColorInput
to make my own HexColorInput
.
Or give more options to HexColorInput
.
Thanks!