Skip to content

Commit ef06e7c

Browse files
feat(client): improve behavior of EditInput component (#193)
1 parent 9bac88a commit ef06e7c

File tree

1 file changed

+14
-10
lines changed
  • packages/client/src/components/inspector/InspectorDataField

1 file changed

+14
-10
lines changed

packages/client/src/components/inspector/InspectorDataField/EditInput.vue

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,16 @@ watch(value, checkWarning())
5454
<span class="flex-inline items-center gap4px">
5555
<VueInput v-model="value" :variant="isWarning ? 'warning' : 'normal'" class="h25px w120px px4px" :auto-focus="autoFocus" @click.stop />
5656
<template v-if="showActions">
57+
<VueButton
58+
v-tooltip="{
59+
content: 'Esc to cancel',
60+
}" size="mini" flat class="p2px!" @click.stop="$emit('cancel')"
61+
>
62+
<template #icon>
63+
<VueIcon icon="i-material-symbols-cancel" />
64+
</template>
65+
</VueButton>
5766
<template v-if="!isWarning">
58-
<VueButton
59-
v-tooltip="{
60-
content: 'Esc to cancel',
61-
}" size="mini" flat class="p2px!" @click.stop="$emit('cancel')"
62-
>
63-
<template #icon>
64-
<VueIcon icon="i-material-symbols-cancel" />
65-
</template>
66-
</VueButton>
6767
<VueButton
6868
v-tooltip="{
6969
content: 'Enter to submit change',
@@ -74,7 +74,11 @@ watch(value, checkWarning())
7474
</template>
7575
</VueButton>
7676
</template>
77-
<VueIcon v-else icon="i-material-symbols-warning" class="color-warning-500 dark:color-warning-300" />
77+
<VueIcon
78+
v-else v-tooltip="{
79+
content: 'Invalid value',
80+
}" icon="i-material-symbols-warning" class="color-warning-500 dark:color-warning-300"
81+
/>
7882
</template>
7983
</span>
8084
</template>

0 commit comments

Comments
 (0)