Skip to content

Commit

Permalink
Make modal flex configurable
Browse files Browse the repository at this point in the history
Make it possible to make the modal flex.
Adjusted app settings dialog to use a flex modal.

Signed-off-by: Vincent Petry <[email protected]>
  • Loading branch information
PVince81 committed Nov 16, 2020
1 parent fcb6421 commit 75aecb4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/components/AppSettingsDialog/AppSettingsDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ export default {
// Return value of the render function
if (this.open) {
return createElement('Modal', {
attrs: {
flex: true,
},
on: {
close: () => { this.handleCloseModal() },
},
Expand Down
13 changes: 12 additions & 1 deletion src/components/Modal/Modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export default {
</transition>

<!-- Content -->
<div class="modal-container">
<div class="modal-container" :class="{ 'flex': flex }">
<!-- @slot Modal content to render -->
<slot />
</div>
Expand Down Expand Up @@ -281,6 +281,13 @@ export default {
type: Boolean,
default: false,
},
/**
* Makes the modal flex
*/
flex: {
type: Boolean,
default: false,
},
},

data() {
Expand Down Expand Up @@ -681,6 +688,10 @@ $header-size: 50px;
border-radius: var(--border-radius-large);
background-color: var(--color-main-background);
box-shadow: 0 0 40px rgba(0, 0, 0, .2);

&.flex {
display: flex;
}
}
&:not(&--large):not(&--full) .modal-container {
max-width: 900px;
Expand Down

0 comments on commit 75aecb4

Please sign in to comment.