From 2102e007ed72058e793abc5dc8cbc9feb9a539c0 Mon Sep 17 00:00:00 2001 From: bmauger Date: Fri, 25 Feb 2022 11:52:43 -0500 Subject: [PATCH] Add icon prop to text input. --- src/assets/img/icons/location-pin.svg | 3 ++ .../textbox-question/textbox-question.vue | 28 ++++++++++++++++-- src/layouts/component-test/component-test.vue | 29 +++++++++++++++++-- 3 files changed, 55 insertions(+), 5 deletions(-) create mode 100644 src/assets/img/icons/location-pin.svg diff --git a/src/assets/img/icons/location-pin.svg b/src/assets/img/icons/location-pin.svg new file mode 100644 index 000000000..e84330374 --- /dev/null +++ b/src/assets/img/icons/location-pin.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/common-components/textbox-question/textbox-question.vue b/src/common-components/textbox-question/textbox-question.vue index 9df4c19e7..5daaa9bd4 100644 --- a/src/common-components/textbox-question/textbox-question.vue +++ b/src/common-components/textbox-question/textbox-question.vue @@ -1,8 +1,10 @@ @@ -16,12 +18,29 @@ export default { placeholderText: String, inputId: String, isRequired: Boolean, + hasIcon: Boolean,// If input has an icon + iconRight: Boolean,// Place icon on right side of text input, otherwise default is left if hasIcon prop is used + iconURL: String, + hasError: Boolean, } }; diff --git a/src/layouts/component-test/component-test.vue b/src/layouts/component-test/component-test.vue index d75266010..c4d45822f 100644 --- a/src/layouts/component-test/component-test.vue +++ b/src/layouts/component-test/component-test.vue @@ -27,12 +27,37 @@
-
With Error (class="has-error"):
+
With icon aligned left
+ +
+
+
+
+
With icon aligned right
+ +
+
+
+
+
With Error