-
I have a component that extends the HTML button but i cant seem to get the right typings so i dont have to explicitly add every attr of a button liskt disabled, onClick ,etc.
I tried this but it doesnt work (HTMLAttributes doesnt exist on preact)
|
Beta Was this translation helpful? Give feedback.
Answered by
657KB
Jun 16, 2022
Replies: 1 comment
-
In Preact, HTMLAttributes are defined in the JSX namespace. import { JSX } from 'preact'
interface ButtonProp extends JSX.HTMLAttributes<HTMLButtonElement> {
// ...
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
ljmerza
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In Preact, HTMLAttributes are defined in the JSX namespace.