WIP Исправлены inputs в SectionAddress

This commit is contained in:
Daria Golova
2022-12-30 17:07:40 +03:00
parent 9fe57eda5e
commit bda481cfe5
5 changed files with 125 additions and 80 deletions

View File

@@ -1,13 +1,17 @@
<template lang="pug">
.flex.flex-col.gap-y-2
.label.font-semibold.text-sm.opacity-40(v-if="label") {{ label }}
.label.font-semibold.text-sm.opacity-40(
v-if="label",
:class="labelClass"
) {{ label }}
.input-wrapper.flex.gap-x-2.px-4.box-border.py-10px(
:class="{'border-none': borderNone, 'border-error': borderError }"
:style="{'background-color': disabled && 'var(--bg-disable-grey-color)'}"
)
input.input.w-full.outline-0.not-italic(
v-model="value",
:style="{'color': disabled && 'var(--font-grey-color-0)'}"
:style="{'color': disabled && 'var(--font-grey-color-0)'}",
:class="textClass",
:placeholder="placeholder",
:disabled="disabled",
:type="type"
@@ -35,6 +39,8 @@ export default {
borderError: Boolean,
disabled: Boolean,
label: String,
textStyle: String,
labelStyle: String,
},
emits: ["update:modelValue"],
computed: {
@@ -46,6 +52,24 @@ export default {
this.$emit("update:modelValue", value);
},
},
textClass() {
return this.textStyle
? {
[this.textStyle]: true,
}
: {
"text-base": true,
};
},
labelClass() {
return this.labelStyle
? {
[this.labelStyle]: true,
}
: {
"text-sm": true,
};
},
},
};
</script>