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

fix(banner): height changes when dismissible #841

Merged
merged 14 commits into from
Jun 1, 2021
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions components/banner/src/vwc-banner.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,18 @@
> .header {
@include typography.typography-cat-shorthand('body-2-bold');
display: flex;
min-height: 60px;
align-items: center;
justify-content: flex-start;
padding: 20px 0;
background-color: var(#{color-connotation.$vvd-color-connotation});
color: var(#{color-connotation.$vvd-color-on-connotation});

&::before {
flex: 0 0 16px;
content: '';
}

> .user-content {
display: flex;
flex: 1 0;
align-items: center;
justify-content: center;
padding-inline: 16px;

> .icon {
--icon-size: 20px;
tveinfeld marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -47,6 +43,10 @@
flex: 0 0 auto;
padding-inline-start: 15px;
}

> .message {
padding: 20px 0;
}
}

> .dismiss-button {
Expand Down
8 changes: 5 additions & 3 deletions components/banner/stories/banner.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ export const Basic = (function () {
{
connotation,
dismissible,
icon
icon,
message
}
) {
cancelAnimations();
Expand Down Expand Up @@ -64,7 +65,7 @@ export const Basic = (function () {
?dismissible=${dismissible}
icon=${ifDefined(icon)}
connotation=${connotation}
message="Here's some information that you may find important!">
message=${message}>
<vwc-button slot="actionItems" layout="filled" @click=${onClose} dense>Learn More</vwc-button>
</vwc-banner>
<div class="content"></div>
Expand All @@ -76,7 +77,8 @@ export const Basic = (function () {

Basic.args = {
connotation: "info",
dismissible: true
dismissible: true,
message: "Here's some information that you may find important!"
};
Basic.argTypes = {
open: {
Expand Down