Skip to content

Commit 7ac7cd5

Browse files
author
m2rt
committed
fix(modal): use correct z-index variable, default footer align to flex-end #301
1 parent bf37a35 commit 7ac7cd5

2 files changed

Lines changed: 16 additions & 10 deletions

File tree

tedi/components/overlay/modal/modal.component.scss

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
@mixin modal-heading($size) {
44
.tedi-modal-header__head {
5+
56
h1,
67
h2,
78
h3,
@@ -13,12 +14,18 @@
1314
}
1415
}
1516

16-
$modal-widths: (xs, sm, md, lg, xl);
17+
$modal-widths: (
18+
xs,
19+
sm,
20+
md,
21+
lg,
22+
xl
23+
);
1724

1825
.tedi-modal {
1926
position: fixed;
2027
inset: 0;
21-
z-index: 1000;
28+
z-index: var(--z-index-modal);
2229
display: none;
2330

2431
&--open {
@@ -95,8 +102,7 @@ $modal-widths: (xs, sm, md, lg, xl);
95102
}
96103

97104
tedi-modal-header {
98-
padding: var(--_tedi-modal-heading-padding-y)
99-
var(--_tedi-modal-heading-padding-x);
105+
padding: var(--_tedi-modal-heading-padding-y) var(--_tedi-modal-heading-padding-x);
100106
border-bottom: var(--borders-01) solid var(--modal-border-inner);
101107

102108
.tedi-modal-header__head {
@@ -121,8 +127,8 @@ $modal-widths: (xs, sm, md, lg, xl);
121127
tedi-modal-footer {
122128
display: flex;
123129
gap: var(--layout-grid-gutters-16);
124-
padding: var(--_tedi-modal-footer-padding-y)
125-
var(--_tedi-modal-footer-padding-x);
130+
justify-content: flex-end;
131+
padding: var(--_tedi-modal-footer-padding-y) var(--_tedi-modal-footer-padding-x);
126132
border-top: var(--borders-01) solid var(--modal-border-inner);
127133
}
128134
}

tedi/components/overlay/modal/modal.stories.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ export const Default: DefaultStory = {
174174
</tedi-select>
175175
</div>
176176
</tedi-modal-content>
177-
<tedi-modal-footer style="justify-content: flex-end;">
177+
<tedi-modal-footer>
178178
<button tedi-button variant="secondary" (click)="open = false">Cancel</button>
179179
<button tedi-button (click)="open = false">Continue</button>
180180
</tedi-modal-footer>
@@ -224,7 +224,7 @@ export const Size: StoryObj<ModalComponent> = {
224224
</tedi-select>
225225
</div>
226226
</tedi-modal-content>
227-
<tedi-modal-footer style="justify-content: flex-end;">
227+
<tedi-modal-footer>
228228
<button tedi-button variant="secondary" (click)="openSmall = false">Cancel</button>
229229
<button tedi-button (click)="openSmall = false">Continue</button>
230230
</tedi-modal-footer>
@@ -251,7 +251,7 @@ export const Size: StoryObj<ModalComponent> = {
251251
</tedi-select>
252252
</div>
253253
</tedi-modal-content>
254-
<tedi-modal-footer style="justify-content: flex-end;">
254+
<tedi-modal-footer>
255255
<button tedi-button variant="secondary" (click)="openDefault = false">Cancel</button>
256256
<button tedi-button (click)="openDefault = false">Continue</button>
257257
</tedi-modal-footer>
@@ -305,7 +305,7 @@ export const FooterVariants: StoryObj<ModalComponent> = {
305305
</tedi-select>
306306
</div>
307307
</tedi-modal-content>
308-
<tedi-modal-footer style="justify-content: flex-end;">
308+
<tedi-modal-footer>
309309
<button tedi-button variant="secondary" (click)="openDefault = false">Cancel</button>
310310
<button tedi-button (click)="openDefault = false">Continue</button>
311311
</tedi-modal-footer>

0 commit comments

Comments
 (0)