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

add Matrix & unit types, update generate mjml file to use Matrix type #38

Closed hchiufaire closed 2 years ago

hchiufaire commented 2 years ago

Addresses #24.

Note: typically the only unit-less number you can have as a CSS prop is "0", so the new type definition of allowing any number without a unit is not as strict as it could be, but props like flex accept other unit-less numbers than "0", so this can be addressed later on in cases if needed

Updated Tests

image

New Type Checking in Web-Email-Server (after yarn link)

image image
hchiufaire commented 2 years ago

@IanEdington I updated the types for all props, not just those that use shorthand/Matrix, so there are a lot more changed props as you were expecting now