mirror of
https://github.com/KevinMidboe/vue-js-modal.git
synced 2025-10-29 18:00:20 +00:00
Updated demos
This commit is contained in:
@@ -39,8 +39,9 @@
|
|||||||
<button @click="show(false, true, false)">Adaptive</button>
|
<button @click="show(false, true, false)">Adaptive</button>
|
||||||
<button @click="show(true, true, false)">Mixed</button>
|
<button @click="show(true, true, false)">Mixed</button>
|
||||||
<button @click="show(false, false, true)">Draggable</button>
|
<button @click="show(false, false, true)">Draggable</button>
|
||||||
<button @click="$modal.show('error-modal')">Demo: Error handling</button>
|
<br>
|
||||||
<button @click="$modal.show('demo-login')">Demo: Login</button>
|
<button class="green" @click="$modal.show('error-modal')">Demo: Error handling</button>
|
||||||
|
<button class="green" @click="$modal.show('demo-login')">Demo: Login</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<props-table />
|
<props-table />
|
||||||
@@ -141,6 +142,18 @@ button {
|
|||||||
color: #20a0ff;
|
color: #20a0ff;
|
||||||
border: 1px solid #20a0ff;
|
border: 1px solid #20a0ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.green {
|
||||||
|
$green: #50C9BA;
|
||||||
|
|
||||||
|
color: $green;
|
||||||
|
border: 1px solid $green;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: mix($green, black, 95%);
|
||||||
|
border: 1px solid mix($green, black, 95%);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width:600px) {
|
@media (max-width:600px) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<modal name="demo-login" transition="pop-out" :width="656" :height="400">
|
<modal name="demo-login" transition="pop-out" :width="modalWidth" :height="400">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="box-part" id="bp-left">
|
<div class="box-part" id="bp-left">
|
||||||
<div class="partition" id="partition-register">
|
<div class="partition" id="partition-register">
|
||||||
@@ -37,8 +37,20 @@
|
|||||||
</modal>
|
</modal>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
const MODAL_WIDTH = 656
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DemoLoginModal'
|
name: 'DemoLoginModal',
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
modalWidth: MODAL_WIDTH
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
this.modalWidth = window.innerWidth < MODAL_WIDTH
|
||||||
|
? MODAL_WIDTH / 2
|
||||||
|
: MODAL_WIDTH
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|||||||
Reference in New Issue
Block a user