tkrotoff / react-form-with-constraints

Simple form validation for React
MIT License
126 stars 20 forks source link

Extend outer theme instead of creating a new one #36

Closed cozmy closed 5 years ago

cozmy commented 5 years ago

Use theme nesting instead of creating a new one. Otherwise, all outer styles will be lost.

Please note that TypeScript complains because of Property 'shape' is missing in type '{ overrides: { MuiFormHelperText: { root: { '&:empty': { marginTop: number; minHeight: number; }; }; }; }; }'.. Probably this is related to typescript type widening. I really think this should be fixed as otherwise, your build may break.

tkrotoff commented 5 years ago

Thanks for the PR. I'm definitely not a Material-UI expert so do you have a small example that reproduces this misbehaving?

tkrotoff commented 5 years ago

I've added your change here: 29ccbe20f7b81f72c84154af036f379fabba9c1e and modified the Material-UI example here: f1bb0d5f383804bc4c5e2515e593c33ca9ef14cc Thanks