Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
I am not totally sure why we need a new parameter just for one use case, Another option would be to change the way the current text parameter works so that it accepts both plain and rich text. We have an example of that in the button component.
<span class="ons-hero__text">{{ params.text | safe }}</span>
This way, users can pass in either plain text and rich text in the same parameter
Contributor
Author
|
@precious-onyenaucheya-ons @Dino-ONS The issue description in the linked ticket explains why this wouldn't work? It would also reduce the spacing for anyone already passing plain text? (And presumably make it different to the design?) |
precious-onyenaucheya-ons
approved these changes
Mar 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the context of this PR?
This PR adds an optional
richTextoption to Hero as requested by the CMS team.https://officefornationalstatistics.atlassian.net/browse/ONSDESYS-816
How to review this PR
Check no regressions. Check that the option can be used with block-level HTML and produces valid markup in the browser (see ticket).
Checklist
This needs to be completed by the person raising the PR.