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

8629 junk: button type safety #21

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

creido-welly
Copy link
Contributor

Relates to wellcometrust/corporate#8629

Context

This PR is an investigation of how to make component types safer for the Button polymorphic component using generics.

For this WIP I've used the as prop to explicitly set the component type as either a or button. Ideally the type and therefore props would be set by the presence or absence of the href prop but so far that is eluding me.

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

Successfully merging this pull request may close these issues.

1 participant