Skip to content

Commit c281217

Browse files
authored
Merge pull request #14334 from IgniteUI/simeonoff/material-banner
refactor(banner): update paddings
2 parents 100a5be + 0a92f98 commit c281217

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

projects/igniteui-angular/src/lib/core/styles/components/banner/_banner-theme.scss

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@
7070
@include css-vars($theme);
7171
$variant: map.get($theme, '_meta', 'variant');
7272

73-
$padding: rem(8px);
74-
$padding-inline-start: calc(#{$padding} * 2);
75-
7673
%igx-banner-host {
7774
igx-expansion-panel-body {
7875
padding: 0;
@@ -99,19 +96,17 @@
9996
justify-content: flex-end;
10097
flex-wrap: wrap;
10198
gap: rem(8px);
102-
padding: rem(8px);
99+
padding: rem(16px) rem(8px);
103100
min-width: rem(320px);
104101
background: var-get($theme, 'banner-background');
102+
box-shadow: inset 0 rem(-1px) 0 0 var-get($theme, 'banner-border-color');
103+
border-radius: var-get($theme, 'border-radius');
105104

106105
@if $variant == 'indigo-design' {
107106
box-shadow: inset 0 0 0 rem(1px) var-get($theme, 'banner-border-color');
108107
padding: rem(16px);
109-
} @else {
110-
box-shadow: inset 0 rem(-1px) 0 0 var-get($theme, 'banner-border-color');
111108
}
112109

113-
border-radius: var-get($theme, 'border-radius');
114-
115110
igc-icon,
116111
igx-icon,
117112
igc-button,

src/app/banner/banner.sample.html

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
<igx-banner #bannerNoSafeConnection [animationSettings]="animationSettings" (onOpened)="onOpen($event)" (onClosed)="onClose($event)">
2-
Your connections is not private!
3-
<igx-icon>lock</igx-icon>
4-
</igx-banner>
1+
<div>
2+
<igx-navbar actionButtonIcon="menu">
3+
<button igxIconButton="flat">
4+
<igx-icon>more_vert</igx-icon>
5+
</button>
6+
</igx-navbar>
7+
<igx-banner #bannerNoSafeConnection [animationSettings]="animationSettings" (onOpened)="onOpen($event)" (onClosed)="onClose($event)">
8+
Your connections is not private!
9+
<igx-icon>lock</igx-icon>
10+
</igx-banner>
11+
</div>
512
<igx-banner #bannerCookies (onOpened)="onOpen($event)" (onClosed)="onClose($event)">
613
<igx-icon>settings</igx-icon>
714
<h5 class="ig-typography__subtitle-1">YOUR COOKIES SETTINGS</h5>

src/app/banner/banner.sample.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { Component, ViewChild } from '@angular/core';
22
import { useAnimation } from '@angular/animations';
3-
import { IgxBannerActionsDirective, IgxBannerComponent, IgxButtonDirective, IgxFlexDirective, IgxIconComponent, IgxLayoutDirective, IgxRippleDirective } from 'igniteui-angular';
3+
import { IgxBannerActionsDirective, IgxBannerComponent, IgxFlexDirective, IgxIconComponent, IgxLayoutDirective, IgxRippleDirective, IgxNavbarModule, IgxButtonModule } from 'igniteui-angular';
44
import { growVerIn, growVerOut } from 'igniteui-angular/animations';
55

66
@Component({
77
selector: 'app-banner-sample',
88
templateUrl: `banner.sample.html`,
99
styleUrls: [`banner.sample.scss`],
1010
standalone: true,
11-
imports: [IgxBannerComponent, IgxIconComponent, IgxBannerActionsDirective, IgxButtonDirective, IgxRippleDirective, IgxLayoutDirective, IgxFlexDirective]
11+
imports: [IgxBannerComponent, IgxIconComponent, IgxBannerActionsDirective, IgxRippleDirective, IgxLayoutDirective, IgxFlexDirective, IgxNavbarModule, IgxButtonModule]
1212
})
1313
export class BannerSampleComponent {
1414
@ViewChild('bannerNoSafeConnection', { static: true })

0 commit comments

Comments
 (0)