Skip to content

Commit da2044f

Browse files
committed
Support modals with content outside the white background area
1 parent be03dba commit da2044f

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

resources/assets/scripts/components/core/Modal.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
<div class="modal-close-icon" v-on:click="close" v-if="dismissable && showCloseIcon">
66
<Icon name="x" aria-label="Close modal" role="button"/>
77
</div>
8-
<slot/>
8+
<div class="modal-content">
9+
<slot/>
10+
</div>
911
</div>
1012
</div>
1113
</transition>

resources/assets/styles/components/modal.css

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
transition: opacity 250ms ease;
55

66
& > .modal-container {
7-
@apply .relative .bg-white .w-full .max-w-md .m-auto .flex-col .flex .rounded .shadow-md;
8-
transition: all 250ms ease;
9-
margin-top: 15%;
7+
@apply .relative .w-full .max-w-md .m-auto .flex-col .flex;
108

119
& > .modal-close-icon {
1210
@apply .absolute .pin-r .p-2 .text-white .cursor-pointer .opacity-50;
@@ -19,6 +17,12 @@
1917
}
2018
}
2119

20+
& > .modal-content {
21+
@apply .bg-white .rounded .shadow-md;
22+
transition: all 250ms ease;
23+
margin-top: 15%;
24+
}
25+
2226
/**
2327
* On tiny phone screens make sure there is a margin on the sides and also
2428
* center the modal rather than putting it towards the top of the screen.

0 commit comments

Comments
 (0)