plotly / dash-html-components

OBSOLETE - now part of https://github.com/plotly/dash
https://dash.plotly.com
Other
153 stars 49 forks source link

proptypes - don't let valid values break validation #110

Closed chriddyp closed 5 years ago

chriddyp commented 5 years ago

Currently users may be providing True or False for boolean properties or numbers for numeric properties. This is valid. With our previous propTypes, these would fail under validation as they are not string.

This PR enables those boolean & numeric properties.

There is a lot more we could do here for deeper validation (e.g. incorporate https://github.com/iandevlin/html-attributes/blob/master/enumerated-attributes.json) however I’d like to keep this PR focused on making sure that existing user’s code doesn’t break (even if it might not be technically valid under the HTML5 spec).