Faire / mjml-react

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

Port `%`, `em` and `px` types from @iduuck's ksv-vc/postbote #24

Closed IanEdington closed 2 years ago

IanEdington commented 2 years ago

@iduuck made some pretty sweet types in his internal version of mjml-react. PercentageMatrix, PixelMatrix and EmMatrix would add a lot of value to our generated components.

https://github.com/ksv-vc/postbote/blob/e0234fdd7d4b4aa507c9dc82e7ef8c6fbbfecdb1/packages/mjml-react/lib/index.ts#L6-L28

PercentageMatrix, PixelMatrix and EmMatrix would have to be added and exported from a production file somewhere, possibly in utils.ts: https://github.com/Faire/mjml-react/blob/383996dc47415fcaa93e36d892e8e18ca78fc609/src/utils.tsx

They would need to be added to the generated components hereish: https://github.com/Faire/mjml-react/blob/383996dc47415fcaa93e36d892e8e18ca78fc609/scripts/generate-mjml-react.ts#L101-L106