-
Notifications
You must be signed in to change notification settings - Fork 361
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
change: [M3-6522] - Tag Component v7 story & cleanup #9840
Conversation
type Variants = 'blue' | 'lightBlue'; | ||
|
||
export interface TagProps extends ChipProps { | ||
asSuggestion?: boolean; |
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.
This was only used as a boolean for closeMenu
(in main search bar) so i took it out and checked for closeMenu
directly
} | ||
history.push(`/search/?query=tag:${label}`); | ||
}; | ||
|
||
// If maxLength is set, truncate display to that length. | ||
const _label = maxLength ? truncateEnd(label, maxLength) : label; | ||
|
||
const tagProps = omit(props, ['asSuggestion', 'closeMenu']); |
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.
we can just use shouldForwardProps on the styled component for this
a2b38d1
to
17d82f7
Compare
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 @abailly-akamai! Changes look good in Storybook, and I'm always excited to see doc improvements and test additions
Description 📝
This PR replaces the Tag component's
.mdx
story with a fresh v7 story.Changes 🔄
Broken hover state in main menu
Poor contrast & accessibility on dark mode
Preview 📷
Apart from the fixes shown above, there should be no change in the way the component looks or behaves.
How to test 🧪
Prerequisites
Verification steps
(How to verify changes)
As an Author I have considered 🤔
Check all that apply