-
Notifications
You must be signed in to change notification settings - Fork 107
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
Warning button variant #976
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, and this would be useful in our service too.
Thanks @paulrobertlloyd this helpful. We'll need to hold this until we can add the guidance to the design system: nhsuk/nhsuk-service-manual#1995 Should be able to use the gov.uk guidance, I don't think there's anything else specific we'd need to add/amend? |
Guidance added in this PR: nhsuk/nhsuk-service-manual#1999 @anandamaryon1 I think this is un-blocked now? |
Ah, one small thing, do you mind if I/we change the example button label to align with the design system documentation? (It's something we want to do moving forward, to ensure both are aligned to avoid confusion). |
@anandamaryon1 ah do you mean change from "Delete account" to "Yes, delete this vaccine"? |
6aecc7d
Merged, thanks @paulrobertlloyd and @anandamaryon1! |
Description
On our staff facing service, we use interruption screens that warn a user before they proceed to undertake an action that is destructive and/or cannot be undone. On these pages, we use also a red warning button to further indicate that a destructive action will take place:
This follows a similar pattern from the GOV.UK Design System:
This PR proposes adding an equivalent
--warning
variant tonhsuk-button
. In the corresponding Service Manual guidance for this component, we can start by using the same guidance as that used in the GOV.UK Design System.Technical note
The SCSS for each button variant currently includes a lot of repeated properties that shouldn’t need redeclaring given each modifier inherits from the base class. That’s a separate issue, so for this PR, I’ve maintained the same implementation and redeclared properties for this variant.
Checklist