Skip to content
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

[UXPT-4816] Add close button to banner #1363

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

pcln-jason-v
Copy link
Collaborator

Ticket
https://priceline.atlassian.net/browse/UXPT-4816

Description
Add close button and onClose function to the GenericBanner

Image
image

@codecov
Copy link

codecov bot commented Jul 20, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.24% 🎉

Comparison is base (d8d5cbb) 94.71% compared to head (b400549) 94.96%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1363      +/-   ##
==========================================
+ Coverage   94.71%   94.96%   +0.24%     
==========================================
  Files         195      195              
  Lines        2309     2324      +15     
  Branches      411      416       +5     
==========================================
+ Hits         2187     2207      +20     
+ Misses         66       61       -5     
  Partials       56       56              
Files Changed Coverage Δ
packages/core/src/GenericBanner/GenericBanner.tsx 96.29% <100.00%> (+3.98%) ⬆️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

const closeButton = container.querySelector('button')
expect(closeButton).toBeTruthy()
closeButton.click()
expect(spyOnClose).toBeCalled()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -39,6 +40,47 @@ const CustomButton = styled(Button)`
text-decoration: ${(props) => (props.buttonTextUnderline ? 'underline' : 'none')};
`

const BannerContent = styled(Box)`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flex maybe?

Copy link
Collaborator Author

@pcln-jason-v pcln-jason-v Jul 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sdalonzo Using Box here should be more correct. Using Flex will make all the items occupy a whole line. It depends on the design.

Box
image

Flex
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants