The "dismiss" button in the nimble-banner had the wrong styling in the following ways:
It was the wrong size. It was 16x16, but it should have been 24x24.
It was using the wrong icon. It was using the xmark icon, but it should have been using the times icon.
The hover styling was wrong. It had custom styling to make it look like a ghost button with a fill on hover (not like any of our standard nimble-button appearance modes). Instead, it should be a standard content-hidden, appearance="ghost", appearance-variant="primary" button.
Note: A number of these differences were because the design spec was updated after the banner was initially implemented.
๐ฉโ๐ป Implementation
Wrapped the contents of the banner's template in a theme provider hard-coded to the color theme
Updated storybook docs to specify that a slotted action button should use the primary appearance variant
Updated instances of the banner within nimble to set appearance-variant="primary" on slotted buttons
Those three changes allowed me to remove a lot of custom styling from the banner.
๐งช Testing
Verified that the only chromatic change was due to the "dismiss" button
โ Checklist
[ ] I have updated the project documentation to reflect my changes or determined no changes are needed.
Pull Request
๐คจ Rationale
The "dismiss" button in the
nimble-banner
had the wrong styling in the following ways:xmark
icon, but it should have been using thetimes
icon.nimble-button
appearance modes). Instead, it should be a standardcontent-hidden
,appearance="ghost"
,appearance-variant="primary"
button.Note: A number of these differences were because the design spec was updated after the banner was initially implemented.
๐ฉโ๐ป Implementation
color
themeaction
button should use theprimary
appearance variantappearance-variant="primary"
on slotted buttonsThose three changes allowed me to remove a lot of custom styling from the banner.
๐งช Testing
โ Checklist