Type '{ onClick: () => void; }' is not assignable to type 'IntrinsicAttributes & SheetBackdropProps & RefAttributes<any>'.
Property 'onClick' does not exist on type 'IntrinsicAttributes & SheetBackdropProps & RefAttributes<any>'.ts(2322)
Expected behaviour
If components like Backdrop are passing rest props to the underlying HTML element, then the prop types for that HTML element should be included in the component prop type.
Issue summary
Adding an
onClick
handler to the Backdrop component seems to be a supported use case, butonClick
is missing from the component's prop type.Code sandbox
https://codesandbox.io/s/practical-swartz-6h6shx?file=/src/App.tsx:132-171
Expected behaviour
If components like Backdrop are passing rest props to the underlying HTML element, then the prop types for that HTML element should be included in the component prop type.