Skip to content

Commit

Permalink
Merge pull request #694 from madeindjs/WF-127-2
Browse files Browse the repository at this point in the history
fix(ui): re-introduce fields unit in Builder - WF-127
  • Loading branch information
ramedina86 authored Dec 16, 2024
2 parents c01562a + 51b2237 commit 94f6293
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ui/src/builder/settings/BuilderSettingsProperties.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
: fieldValue.name ?? fieldKey
"
:hint="fieldValue.desc"
:type="fieldValue.type"
:unit="fieldValue.type"
>
<BuilderFieldsColor
v-if="fieldValue.type == FieldType.Color"
Expand Down
13 changes: 10 additions & 3 deletions src/ui/src/wds/WdsFieldWrapper.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<template>
<div class="WdsFieldWrapper colorTransformer">
<div v-if="label || helpButton" class="WdsFieldWrapper__title">
<label v-if="label" class="WdsFieldWrapper__title__label">{{
label
}}</label>
<label v-if="label" class="WdsFieldWrapper__title__label"
>{{ label
}}<span v-if="unit" class="WdsFieldWrapper__title__label__unit"
>&nbsp;:&nbsp;{{ unit }}</span
>
</label>
<button
v-if="helpButton"
class="WdsFieldWrapper__title__help"
Expand All @@ -22,6 +25,7 @@
<script setup lang="ts">
defineProps({
label: { type: String, required: false, default: undefined },
unit: { type: String, required: false, default: undefined },
hint: { type: String, required: false, default: undefined },
helpButton: {
type: [String, Boolean],
Expand Down Expand Up @@ -70,6 +74,9 @@ defineEmits({
font-weight: 400;
line-height: 20px;
}
.WdsFieldWrapper__title__label__unit {
color: var(--secondaryTextColor);
}
.WdsFieldWrapper__hint {
color: var(--secondaryTextColor);
Expand Down

0 comments on commit 94f6293

Please sign in to comment.