Skip to content

Commit

Permalink
Fix#4294/input required mark and switch left label (#4295)
Browse files Browse the repository at this point in the history
* fix(switch): alignment with left positioned label

* fix(input-label): required mark size
  • Loading branch information
untael authored Jun 3, 2024
1 parent 69a3202 commit 5f6bda5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const { getColor } = useColors()
&__required-mark {
transform: translate(0, -2px);
color: var(--va-danger);
font-size: 18px;
font-size: 1.2em;
font-weight: var(--va-input-container-label-font-weight);
vertical-align: middle;
}
Expand Down
20 changes: 14 additions & 6 deletions packages/ui/src/components/va-switch/VaSwitch.demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,20 @@
label="large"
/>
</VbCard>
<VbCard title="Left label">
<va-switch
v-model="value"
label="left"
left-label
/>
<VbCard title="Label Position" style="width: 300px;">
<div>
<va-switch
v-model="value"
label="right"
/>
</div>
<div>
<va-switch
v-model="value"
label="left"
left-label
/>
</div>
</VbCard>
<VbCard title="Custom labels">
<div>
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/components/va-switch/VaSwitch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ defineExpose({
&--left-label {
.va-switch__container {
flex-direction: row-reverse;
justify-content: start;
}
.va-switch__label {
Expand Down

0 comments on commit 5f6bda5

Please sign in to comment.