-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[TopBar] Add showFocusBorder prop option to TopBar.SearchField #2886
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
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.
Code and 🎩 look good 👍
Going to rework this a little bit with feedback from @danrosenthal
|
cc @Shopify/global-nav-web for tracking |
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.
I think it would be good to add some tests around setBorderColor
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.
Just one super nit pick but I'm not bothered if this gets merged without the change 👍
src/components/TopBar/components/SearchField/tests/SearchField.test.tsx
Outdated
Show resolved
Hide resolved
….test.tsx Co-Authored-By: Kyle Durand <kyledurand@users.noreply.github.com>
…fy#2886) * Add showFocusBorder prop option to TopBar.SearchField Co-authored-by: Kyle Durand <kyledurand@users.noreply.github.com>
WHY are these changes introduced?
Added
showFocusBorder
prop to theTopBar.SearchField
to allow users to add show a border on focus (https://github.com/Shopify/web/pull/25334).WHAT is this pull request doing?
A border is added to the backdrop when the search input receives focus. The color of the border is determined by if the user has provided the
focusBorder
theme value.How to 🎩
🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines
Copy-paste this code in
playground/Playground.tsx
:🎩 checklist
README.md
with documentation changes