Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EuiStepHorizontal] needs to extend HTMLButtonElement types #4164

Closed
thompsongl opened this issue Oct 21, 2020 · 2 comments · Fixed by #4166
Closed

[EuiStepHorizontal] needs to extend HTMLButtonElement types #4164

thompsongl opened this issue Oct 21, 2020 · 2 comments · Fixed by #4166
Assignees

Comments

@thompsongl
Copy link
Contributor

#4135 changed the base element of EuiStepHorizontal from a div to a button, but the base element types were removed rather than converted.

Need to reinstate the type extensions with the correct element.

@myasonik
Copy link
Contributor

Oops, sorry!

Is there a good explainer for when a component needs to extend a base HTML element type and when it doesn't?

@thompsongl
Copy link
Contributor Author

Not a problem! I approved it 😅

General rule: if the component props get spread ({...rest}) onto a HTML element, the component should extend the types of said HTML element. In this case, we just need to use ButtonHTMLAttributes<HTMLButtonElement> where HTMLAttributes<HTMLDivElement> was previously.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants