purescript-flare icon indicating copy to clipboard operation
purescript-flare copied to clipboard

Question about extending the library

Open adicirstei opened this issue 8 years ago • 3 comments

Hi! Thanks for taking the time to develop this project. I really like it.

I was wondering what would be the most straightforward way to extend the existing collection of components? For example I would like to add <input type="file"> one.

adicirstei avatar Apr 26 '18 11:04 adicirstei

Hi,

Thank you for the feedback!

The easiest way to add another input type would probably be to modify the Flare source code itself (I'd appreciate a pull request!) by following a similar example. For <input type="file">, maybe start with the color input or the string input. It's probably only going to require some copy & paste + renaming and small adaptations.

What would be the output type? data File = File String with String being the filename?

sharkdp avatar Apr 26 '18 18:04 sharkdp

The output type I would rather say it should be DOM.File.Types.File, in order to be able to do something with it.

adicirstei avatar Apr 27 '18 10:04 adicirstei

:+1:

sharkdp avatar Apr 29 '18 12:04 sharkdp