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

Feat/button #136

Merged
merged 17 commits into from
May 3, 2022
Merged

Feat/button #136

merged 17 commits into from
May 3, 2022

Conversation

mantagen
Copy link
Collaborator

@mantagen mantagen commented Apr 28, 2022

Description

  • Updates Button component inline with figma designs
  • Adds IconButton component
  • Adds ButtonOrLink component which renders either button or Link (next/link) depending on if "href" or "onClick" passed
  • Adds LessonHeader component based on figma designs
  • Adds tests for BookmarkLessonButton
  • Changes some kebak-case css classes to camelCase

Issue(s)

Fixes #

How to test

  1. Go to {cloud link}
  2. Click on _______
  3. You should see _______

Screenshots

How it should now look:

image

image

image

Checklist

  • Added or updated tests where appropriate
  • Manually tested across browsers / devices
  • Considered impact on accessibility
  • Design sign-off
  • Approved by product owner

@vercel
Copy link

vercel bot commented Apr 28, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
samara ✅ Ready (Inspect) Visit Preview May 3, 2022 at 4:17PM (UTC)

@mantagen mantagen marked this pull request as ready for review April 29, 2022 15:28
};
return (
<Link {...nextLinkProps} passHref>
<a {...anchorProps} />
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Great question, followed a bit of a twitter search and ended up in this discussion: alphagov/govuk_elements#272

Basically, yes, we should add role='button' and add a "space" key handler which triggers onClick()!

jimCresswell
jimCresswell previously approved these changes May 3, 2022
Copy link
Contributor

@jimCresswell jimCresswell left a comment

Choose a reason for hiding this comment

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

This is great. My only question is whether we should add role='button' on the link "buttons".

@sonarqubecloud
Copy link

sonarqubecloud bot commented May 3, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

86.5% 86.5% Coverage
0.0% 0.0% Duplication

@mantagen mantagen merged commit 49135ea into main May 3, 2022
@mantagen mantagen deleted the feat/button branch May 3, 2022 16:25
@oak-machine-user
Copy link
Collaborator

🎉 This PR is included in version 0.15.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants