react-colorful icon indicating copy to clipboard operation
react-colorful copied to clipboard

HexColorInput

Open dcworldwide opened this issue 2 years ago • 4 comments

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";

dcworldwide avatar Sep 18 '21 02:09 dcworldwide

Hi! That's actually a great idea and I definitely should implement something like const props = useHexColorInput() 👍

omgovich avatar Sep 20 '21 09:09 omgovich

Running into this problem, too 😄

CharcoalStyles avatar Mar 09 '22 00:03 CharcoalStyles

i have the same problem

MarufSharifi avatar May 14 '22 11:05 MarufSharifi

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!

Bartel-C8 avatar Sep 05 '22 08:09 Bartel-C8