Skip to content

Commit

Permalink
v 1.1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
burhanahmeed committed Feb 18, 2021
1 parent 3b41b0a commit 3a8edaa
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 8 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ text color of modal when mode is light
#### `modalSize`
size of modal dialog
- type: `String`
- value: `md` | `lg` | `xl` | `full-w` | `full-hw`
- value: `md` | `lg` | `xl` | `full-w` | `full-hw` | `sidebar-l` | `sidebar-r`

## API

Expand All @@ -169,6 +169,10 @@ Feel free to open an issue or pull request. Open an issue if you want discussing

## Changelogs

#### 1.1.6
- Add more `modalSize` options -> [`sidebar-r`, `sidebar-l`]
- Add little A11y

#### 1.1.5
- Add props `modalSize` with value [`md`, `lg`, `xl`, `full-w`, `full-hw`]
- fix reponsiveness problems
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@burhanahmeed/vue-modal-2",
"version": "1.1.5",
"version": "1.1.6",
"private": false,
"author": "Burhanuddin Ahmed <[email protected]>",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
}"
:darkMode="false"
@on-close="handleClose2"
modalSize="full-hw"
modalSize="sidebar-l"
>
<div>content</div>
</modal-vue>
Expand Down
43 changes: 38 additions & 5 deletions src/components/Container.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
aria-modal="true"
:aria-labelledby="`dialog ${name}`"
>
<div class="vm2_modal-dialog vm2_settings" :class="contentSize? contentSize: ''" role="document">
<div
class="vm2_modal-dialog vm2_settings"
:class="`${contentSize? contentSize: ''} ${visible? 'vm2_visible': ''}`"
role="document"
>
<div
class="vm2_modal-content"
:id="`vm2_box_${name}`"
Expand Down Expand Up @@ -159,6 +163,10 @@ export default {
return 'vm2_fullWidth'
} else if (this.modalSize === 'full-hw') {
return 'vm2_full-hw'
} else if (this.modalSize == 'sidebar-r') {
return 'vm2_sidebar-r'
} else if (this.modalSize == 'sidebar-l') {
return 'vm2_sidebar-l'
}
}
return null
Expand Down Expand Up @@ -244,22 +252,47 @@ export default {
.vm2_body {
overflow-y: auto;
}
.vm2_full-hw .vm2_modal-content {
.vm2_full-hw .vm2_modal-content,
.vm2_sidebar-r .vm2_modal-content,
.vm2_sidebar-l .vm2_modal-content {
display: flex;
flex-direction: column;
height: 100%;
}
.vm2_full-hw .vm2_body {
.vm2_full-hw .vm2_body,
.vm2_sidebar-r .vm2_body,
.vm2_sidebar-l .vm2_body {
flex: 1 1 auto;
position: relative;
}
.vm2_full-hw.vm2_modal-dialog {
max-height: unset;
}
.vm2_full-hw.vm2_settings {
.vm2_full-hw.vm2_settings,
.vm2_sidebar-r.vm2_settings,
.vm2_sidebar-l.vm2_settings {
height: unset;
margin: 0.3rem;
margin: 0rem;
}
.vm2_sidebar-r.vm2_modal-dialog {
max-height: unset;
left: unset;
width: 100%;
}
.vm2_sidebar-l.vm2_modal-dialog {
max-height: unset;
right: unset;
width: 100%;
}
.vm2_sidebar-r.vm2_modal-dialog {
right: -10000px;
transition: right .7s ease;
}
.vm2_visible.vm2_sidebar-r.vm2_modal-dialog {
right: 0;
}
@media screen and (min-width: 370px) {
.vm2_settings {
Expand Down
1 change: 1 addition & 0 deletions src/components/withHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<h4 style="margin: 5px 10px">{{ title }}</h4>
</div>
<button
tabindex="1"
ref="closeButton"
aria-label="Close"
role="button"
Expand Down

0 comments on commit 3a8edaa

Please sign in to comment.