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

Add default value for warning text icon fallback attribute #3312

Merged
merged 1 commit into from
Feb 21, 2023

Conversation

owenatgov
Copy link
Contributor

What/Why

Adds the default text 'Warning' to the iconFallbackText option for the warning text component.

As we're now setting a default value, I've also set this to no longer be a required attribute. I couldn't find any evidence in commit history that there's a risk in setting a default and not setting this as required and we use the word 'Warning' for this value in all our review app examples and our code example on the website, therefore I don't think this change is controversial.

Fixes #2693

@owenatgov owenatgov requested a review from a team February 20, 2023 18:02
@owenatgov owenatgov self-assigned this Feb 20, 2023
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3312 February 20, 2023 18:02 Inactive
@owenatgov owenatgov changed the title Add default fallback for warning text icon fallback attribute Add default value for warning text icon fallback attribute Feb 20, 2023
@owenatgov owenatgov force-pushed the default-warning-text-icon-fallback branch from cd6c502 to e29aa85 Compare February 20, 2023 18:03
@owenatgov owenatgov marked this pull request as ready for review February 20, 2023 18:03
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3312 February 20, 2023 18:04 Inactive
Copy link
Contributor

@colinrotherham colinrotherham left a comment

Choose a reason for hiding this comment

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

Nice work

Clue is in the name govukWarningText() that "Warning" makes a sensible default 🎉

@owenatgov owenatgov merged commit 1920d9a into main Feb 21, 2023
@owenatgov owenatgov deleted the default-warning-text-icon-fallback branch February 21, 2023 13:52
@querkmachine
Copy link
Member

Does this need a changelog entry?

@romaricpascal romaricpascal mentioned this pull request Apr 20, 2023
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.

Consider a default value for warningText component's iconFallbackText
4 participants