dash icon indicating copy to clipboard operation
dash copied to clipboard

add prop types to tsx components

Open T4rk1n opened this issue 4 months ago • 2 comments

Fix #3014

We use the propTypes defined on the react components to provide runtime prop validation on dash components. This property is missing from typescript components as they don't define that attribute, this PR generate propTypes for the components using the extracted metadata and saves it in a proptypes.js in the package directory. This file should be added as a dev dependencies in the package __init__.py _js_dist like this:

_js_dist = [
...,
"dev_package_path": "proptypes.js",
"namespace": "package"
]

T4rk1n avatar Oct 11 '24 19:10 T4rk1n