-
Notifications
You must be signed in to change notification settings - Fork 1k
add notification.message.fill #7488
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 notification.message.fill #7488
Conversation
| fill={ | ||
| Message === Paragraph | ||
| ? theme.notification.message?.fill || false | ||
| : undefined | ||
| } |
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'm trying to think of a cleaner way to do this. It seems pretty awkward to first set Message to Paragraph or Text and then compare against Paragraph here. I think it would at least be better to set up props at the same time you define whether it's Paragraph or Text. It would probably be cleaner to actually pull this up into a separate Message component.
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 can take a stab at making this a bit cleaner
Co-authored-by: Mike Kingdom <michael.kingdom@hpe.com>
Co-authored-by: Mike Kingdom <michael.kingdom@hpe.com>
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.
Tiny comment but otherwise looks good!
Co-authored-by: Taylor Seamans <taylor.seamans@yahoo.com>
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.
Looks good!
What does this PR do?
This PR enhances Notification theme to be able to pass
fill: trueto the theme for when Paragraph is used.Where should the reviewer start?
notification.js
What testing has been done on this PR?
locally
How should this be manually tested?
locally
Do Jest tests follow these best practices?
screenis used for querying.asFragment()is used for snapshot testing.Any background context you want to provide?
In cases where Notification direction is "column" (so the message renders as a paragraph), the theme should have the ability to set paragraph fill={true}.
What are the relevant issues?
closes #7485
Screenshots (if appropriate)
Do the grommet docs need to be updated?
yes
Should this PR be mentioned in the release notes?
yes
Is this change backwards compatible or is it a breaking change?
backwards compatible