Organised components into directories

This commit is contained in:
Alicia Sykes
2021-04-13 12:36:31 +01:00
parent 0761e4d5a4
commit 8bdf59a1ee
16 changed files with 17 additions and 305 deletions

View File

@@ -0,0 +1,57 @@
<template>
<modal :name="name" :resizable="true" width="80%" height="80%" @closed="$emit('closed')">
<div slot="top-right" @click="hide()">Close</div>
<a @click="hide()" class="close-button" title="Close">x</a>
<iframe :src="url" @keydown.esc="close" class="frame"/>
</modal>
</template>
<script>
export default {
name: 'IframeModal',
props: {
name: String,
},
data: () => ({
url: '#',
}),
methods: {
show: function show(url) {
this.url = url;
this.$modal.show(this.name);
},
hide: function hide() {
this.$modal.hide(this.name);
},
},
};
</script>
<style lang="scss">
.frame {
width: 100%;
height: 100%;
border: none;
}
.close-button {
position: absolute;
right: 0;
padding: 0.5rem;
border: 0;
border-radius: 0 0 0 10px;
background: var(--primary);
color: var(--background);
border-left: 1px solid var(--primary);
border-bottom: 1px solid var(--primary);
cursor: pointer;
&:hover {
background: var(--background);
color: var(--primary);
}
}
</style>