-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Moves <TextHighlight /> component to @wordpress/components package #18609
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.
Thanks I'm going to get back to this just as soon as I can. Likely this Friday. |
TextHighlight
component to @wordpress/components package
TextHighlight
component to @wordpress/components packageAlso updates LinkControl with new reference
Co-Authored-By: Grzegorz (Greg) Ziółkowski <grzegorz@gziolo.pl>
Co-Authored-By: Grzegorz (Greg) Ziółkowski <grzegorz@gziolo.pl>
Addresses #18609 (comment)
a8def98
to
eeb48f2
Compare
@gziolo I was intending to keep the As a result, I've refactored to the new experimental API. |
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.
It looks like you need to regenerate one of the snapshots generated from Storybook story. Otherwise, Jest seems to be happy about the proposed refactor :)
Nice work, thanks for applying my feedback.
Feel free to merge once you get into agreement with Travis 😄
Thanks for the reviews @gziolo! Much appreciated. |
Closes #18074.
This PR extracts the
TextHighlight
used withinLinkControl
into a standalone component.TextHighlight
is a component which applies a<mark>
tag around all/any matching strings within a string of text. This is useful for highlighting search terms within a string of text.How has this been tested?
LinkControl
hasn't broken and search terms are still highlighted.Screenshots
Types of changes
New feature (non-breaking change which adds functionality).
Checklist: