Skip to content

Commit 7b3a7cf

Browse files
committed
Add undo trailing icon
Signed-off-by: Christopher Ng <chrng8@gmail.com>
1 parent 6f9dac3 commit 7b3a7cf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/components/NcTextField/NcTextField.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ export default {
131131
<template v-if="type !== 'search'" #trailing-button-icon>
132132
<Close v-if="trailingButtonIcon === 'close'" :size="20" />
133133
<ArrowRight v-else-if="trailingButtonIcon === 'arrowRight'" :size="20" />
134+
<Undo v-else-if="trailingButtonIcon === 'undo'" :size="20" />
134135
</template>
135136
</NcInputField>
136137
</template>
@@ -141,6 +142,7 @@ import NcInputField from '../NcInputField/NcInputField.vue'
141142
142143
import Close from 'vue-material-design-icons/Close.vue'
143144
import ArrowRight from 'vue-material-design-icons/ArrowRight.vue'
145+
import Undo from 'vue-material-design-icons/UndoVariant.vue'
144146
145147
import { t } from '../../l10n.js'
146148
@@ -151,6 +153,7 @@ export default {
151153
NcInputField,
152154
Close,
153155
ArrowRight,
156+
Undo,
154157
},
155158
156159
props: {
@@ -230,14 +233,15 @@ export default {
230233
231234
/**
232235
* Specifies which material design icon should be used for the trailing
233-
* button. Values can be `close` anbd `arrowRight`.
236+
* button. Value can be `close`, `arrowRight`, or `undo`.
234237
*/
235238
trailingButtonIcon: {
236239
type: String,
237240
default: 'close',
238241
validator: (value) => [
239242
'close',
240243
'arrowRight',
244+
'undo',
241245
].includes(value),
242246
},
243247

0 commit comments

Comments
 (0)