color input fixes

This commit is contained in:
Henry Jameson 2024-10-26 19:48:48 +03:00
parent 92f724de36
commit 7419616f61
3 changed files with 9 additions and 3 deletions

View file

@ -5,6 +5,10 @@
flex: 1 1 auto; flex: 1 1 auto;
} }
.opt {
margin-right: 0.5em;
}
&-field.input { &-field.input {
display: inline-flex; display: inline-flex;
flex: 0 0 0; flex: 0 0 0;

View file

@ -103,6 +103,7 @@
> >
</div> </div>
<ColorInput <ColorInput
v-if="!noColorControl"
class="input-color-input" class="input-color-input"
v-model="colorOverride" v-model="colorOverride"
fallback="#606060" fallback="#606060"
@ -128,19 +129,19 @@ export default {
'previewStyle', 'previewStyle',
'previewCss', 'previewCss',
'disabled', 'disabled',
'invalid' 'invalid',
'noColorControl'
], ],
emits: ['update:shadow'], emits: ['update:shadow'],
data () { data () {
return { return {
colorOverride: null, colorOverride: undefined,
lightGrid: false, lightGrid: false,
zoom: 100 zoom: 100
} }
}, },
computed: { computed: {
style () { style () {
console.log(this.previewStyle)
const result = [ const result = [
this.previewStyle, this.previewStyle,
`zoom: ${this.zoom / 100}` `zoom: ${this.zoom / 100}`

View file

@ -151,6 +151,7 @@
:preview-css="previewCss" :preview-css="previewCss"
:disabled="!editedSubShadow && typeof editedShadow !== 'string'" :disabled="!editedSubShadow && typeof editedShadow !== 'string'"
:shadow="editedSubShadow" :shadow="editedSubShadow"
:no-color-control="true"
@update:shadow="({ axis, value }) => updateSubShadow(axis, value)" @update:shadow="({ axis, value }) => updateSubShadow(axis, value)"
/> />
</div> </div>