separate shadow preview into its own component, needed for themes3 editor

This commit is contained in:
Henry Jameson 2024-09-24 19:19:53 +03:00
commit 735433beb4
4 changed files with 205 additions and 163 deletions

View file

@ -3,6 +3,7 @@ import OpacityInput from 'src/components/opacity_input/opacity_input.vue'
import Select from 'src/components/select/select.vue'
import Checkbox from 'src/components/checkbox/checkbox.vue'
import Popover from 'src/components/popover/popover.vue'
import ComponentPreview from 'src/components/component_preview/component_preview.vue'
import { getCssShadow, getCssShadowFilter } from '../../services/theme_data/theme_data.service.js'
import { library } from '@fortawesome/fontawesome-svg-core'
import { throttle } from 'lodash'
@ -49,7 +50,8 @@ export default {
OpacityInput,
Select,
Checkbox,
Popover
Popover,
ComponentPreview
},
beforeUpdate () {
this.cValue = (this.modelValue ?? this.fallback ?? []).map(toModel)
@ -81,7 +83,6 @@ export default {
return this.modelValue == null
},
style () {
console.log(this.separateInset)
if (this.separateInset) {
return {
filter: getCssShadowFilter(this.cValue),