Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marius-wieschollek/passwords-webextension.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/vue/Components/Theming/PreviewTheme.vue')
-rw-r--r--src/vue/Components/Theming/PreviewTheme.vue36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/vue/Components/Theming/PreviewTheme.vue b/src/vue/Components/Theming/PreviewTheme.vue
new file mode 100644
index 0000000..be3f210
--- /dev/null
+++ b/src/vue/Components/Theming/PreviewTheme.vue
@@ -0,0 +1,36 @@
+<template>
+ <iframe :src="url" class="theme-preview"/>
+</template>
+
+<script>
+ export default {
+ props: {
+ theme: {
+ type: String
+ }
+ },
+
+ data() {
+ return {
+ url: 'about:blank'
+ };
+ },
+
+ mounted() {
+ this.url = 'preview.html';
+ },
+
+ watch: {
+ theme(value, oldValue) {
+ if(oldValue !== null) this.$el.contentWindow.location.reload();
+ }
+ }
+ };
+</script>
+
+<style lang="scss">
+ .theme-preview {
+ height : 360px;
+ border : 1px solid var(--element-hover-bg-color);
+ }
+</style> \ No newline at end of file