Files
baserow/web-frontend/modules/builder/components/theme/ThemeConfigBlock.vue
716d43a9a8 Nuxt 3 migration (#4342)
Update the nuxt3 version.

Co-authored-by: Jonathan Adeline <jonathan@baserow.io>
Co-authored-by: Bram Wiepjes <bramw@protonmail.com>
Co-authored-by: Cezary <cezary@baserow.io>
Co-authored-by: Tsering Paljor <tsering@baserow.io>
Co-authored-by: Przemyslaw Kukulski <przemyslaw+gh@baserow.io>
Co-authored-by: Bram <bram2w@users.noreply.github.com>
2026-01-22 10:27:19 +01:00

56 lines
1.1 KiB
Vue

<template>
<div
class="theme-config-block"
:class="{
'theme-config-block--no-preview': !preview,
}"
>
<component
:is="themeConfigBlockType.component"
ref="themeConfigBlockForm"
:preview="preview"
:theme="theme"
:extra-args="extraArgs"
:default-values="defaultValues"
@values-changed="$emit('values-changed', $event)"
/>
</div>
</template>
<script>
export default {
name: 'ThemeConfigBlock',
props: {
defaultValues: {
type: Object,
required: false,
default: () => ({}),
},
theme: { type: Object, required: false, default: null },
themeConfigBlockType: {
type: Object,
required: true,
},
extraArgs: {
type: Object,
required: false,
default: null,
},
preview: {
type: Boolean,
required: false,
default: true,
},
},
emits: ['values-changed'],
methods: {
reset() {
this.$refs.themeConfigBlockForm.reset()
},
isFormValid() {
return this.$refs.themeConfigBlockForm.isFormValid()
},
},
}
</script>