Commit a34d035
fix: Fix type for
`HTMLProps` is only intended for HTML Elements. `HTMLProps<AnElement>` means `HTMLAttributes<AnElement> & ClassAttributes<AnElement>`
`ClassAttributes<T>` means something has a `ref: string | (instance: T) => any` property.
A component wrapping an element (like ours) should therefore have props extending
* `HTMLAttributes<WrappedElement>` (for the element props it passes on), and
* `ClassAttributes<Wrapper>` (for the ref function `ref={wrapper => ...}`)ref prop (#9)1 parent 5941b8c commit a34d035
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
0 commit comments