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(react): change button href check from key to value #576

Merged
merged 1 commit into from
Apr 13, 2021
Merged

Conversation

rabelloo
Copy link
Contributor

Purpose

Make sure <Button href={undefined} /> renders a <button> and not an <a>.

<Button href="" /> will now also render as <button>, as will any falsey value.

Approach

Check href for value and not just the key presence.

Testing

  1. Go to https://onfido.github.io/castor/?path=/docs/react-button--all-combinations, no button is disabled as they all incorrectly render as <a>
  2. Go to the same story (directly from url, navigating doesn't work) in this PR preview, the first rows should render as <button>

Risks

None.

@rabelloo rabelloo requested a review from josokinas April 13, 2021 09:17
@rabelloo rabelloo self-assigned this Apr 13, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Apr 13, 2021

🎊 PR Preview a135576 has been successfully built and deployed to https://onfido-castor-preview-pr-576.surge.sh

🕐 Build time: 190.379s

🤖 By surge-preview

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