add modal system, added/removed managed by vue, appearence managed by bootstrap

Modal component is an hybrid solution between :
- Vue3 modal implementation
  => with 'v-if:showModal' directive:parameter, html scope is added/removed not just shown/hidden
  => with slot we can pass content from parent component
  => some classes are passed from parent component
- Bootstrap 4.4 _modal.scss module
  => using bootstrap css classes, the modal have a responsive behaviour,
  => modal design can be configured using css classes (size, scroll)

See
* https://v3.vuejs.org/examples/modal.html#modal-component
* https://github.com/bootstrap-vue/bootstrap-vue/issues/5196
This commit is contained in:
2021-04-29 10:33:15 +02:00
parent e1dbfdafd7
commit 2050460bb3
4 changed files with 34 additions and 95 deletions

View File

@@ -66,34 +66,10 @@ div.vue-component {
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
background-color: rgba(0, 0, 0, 0.6);
display: table;
transition: opacity 0.3s ease;
}
.modal-wrapper {
display: table-cell;
vertical-align: middle;
}
.modal-container {
width: 500px;
margin: 0px auto;
background-color: #fff;
border-radius: 0px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.33);
transition: all 0.3s ease;
font-family: Helvetica, Arial, sans-serif;
}
.modal-header h2 {
margin-top: 0;
color: #42b983;
}
.modal-body {
margin: 0;
}
.modal-default-button {
display: block;
margin-top: 1rem;
}
/*
* The following styles are auto-applied to elements with