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

fix: components with onclicks should be buttons #60

Merged
merged 4 commits into from
Dec 20, 2023

Conversation

aurorascharff
Copy link
Contributor

@aurorascharff aurorascharff commented Dec 20, 2023

Describe your changes

Using anchor tags as buttons is not recommended. It causes issues such as not being able to tab to the button. Refactored MdLink, MdTile and MdTileVertical to conditionally render <button or <a depending on the input props.

Checklist before requesting a review

  • I have performed a self-review and test of my code
  • If new component: Is story for component created in stories-folder?
  • If new component: Is tsx-file import added to packages/react/index.tsx?
  • If new component: Is css-file added to packages/css/index.css?

@aurorascharff aurorascharff changed the title Fix links with onclicks fix: links with onclicks should be buttons Dec 20, 2023
@aurorascharff aurorascharff changed the title fix: links with onclicks should be buttons fix: components with onclicks should be buttons Dec 20, 2023
@aurorascharff aurorascharff marked this pull request as ready for review December 20, 2023 10:58
@aurorascharff aurorascharff requested a review from a team as a code owner December 20, 2023 10:58
Copy link
Contributor

@Jaanesen Jaanesen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ikke testet selv men ser ok ut

@aurorascharff aurorascharff merged commit 96258b2 into main Dec 20, 2023
@aurorascharff aurorascharff deleted the fix-links-with-onclicks branch December 20, 2023 12:36
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.

2 participants