From 5104df0af0263eef868ef01277057e09f2dd5b9c Mon Sep 17 00:00:00 2001 From: Kevin Midboe Date: Mon, 10 Jan 2022 01:25:18 +0100 Subject: [PATCH] Width fix for password inputs --- src/components/ui/SeasonedInput.vue | 65 +++++++++++++++++++---------- 1 file changed, 42 insertions(+), 23 deletions(-) diff --git a/src/components/ui/SeasonedInput.vue b/src/components/ui/SeasonedInput.vue index 4c452c6..edc3fd5 100644 --- a/src/components/ui/SeasonedInput.vue +++ b/src/components/ui/SeasonedInput.vue @@ -1,10 +1,23 @@ @@ -13,52 +26,55 @@ export default { props: { placeholder: { type: String }, icon: { type: String }, - type: { type: String, default: 'text' }, + type: { type: String, default: "text" }, value: { type: String, default: undefined } }, data() { return { inputValue: this.value || undefined, tempType: undefined - } + }; }, methods: { submit(event) { - this.$emit('enter') + this.$emit("enter"); }, handleInput(event) { if (this.value !== undefined) { - this.$emit('update:value', this.inputValue) + this.$emit("update:value", this.inputValue); } else { - this.$emit('change', this.inputValue, event) + this.$emit("change", this.inputValue, event); } }, toggleShowPassword() { - if (this.tempType === 'text') { - this.tempType = 'password' + if (this.tempType === "text") { + this.tempType = "password"; } else { - this.tempType = 'text' + this.tempType = "text"; } } } -} +}; \ No newline at end of file +