Faire / mjml-react

React component library to generate the HTML emails on the fly
https://www.npmjs.com/package/@faire/mjml-react
MIT License
376 stars 16 forks source link

Will be loose any functionality by dropping the `handleColor` function? #19

Closed IanEdington closed 1 year ago

IanEdington commented 1 year ago

Investigate if handleColor could add functionality to the mjml color props. It might be worth looking into re-implementing.

https://github.com/Faire/mjml-react/blob/bf035e1fb4a4b8ccf3f962687b8a0fb2ccdd2001/src/utils.js#L61-L71

_Originally posted by @IanEdington in https://github.com/Faire/mjml-react/pull/17#discussion_r993771994_

emmclaughlin commented 1 year ago

@IanEdington the test in mjml-tags.spec.js (here) shows what functionality the handleColor function had. It seems to clean broken color strings and sometimes reformat inputs to the color props. It is cool, but I am not sure it is something that should continue to be supported as individual teams may have their own ways of handling colors (and so may not want to rely on the Color dependency)

IanEdington commented 1 year ago

Ok that's pretty cool, but I agree with you that it's not core to the library. Thanks for looking into this!