From d163c964d4060777ddfe543e29c63d6ec08a0178 Mon Sep 17 00:00:00 2001 From: Henry Okonkwo Date: Mon, 23 Oct 2023 14:44:49 +0200 Subject: [PATCH 1/2] feat(FT-329): implement review feedback --- .../Select/components/SelectInner.vue | 2 +- src/components/Select/select.scss | 26 +++++++++++++++++++ src/components/TextField/SbTextField.vue | 10 +++++-- 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/src/components/Select/components/SelectInner.vue b/src/components/Select/components/SelectInner.vue index f6ff0e69c..b4d6dbb90 100644 --- a/src/components/Select/components/SelectInner.vue +++ b/src/components/Select/components/SelectInner.vue @@ -122,7 +122,7 @@ - + diff --git a/src/components/Select/select.scss b/src/components/Select/select.scss index d75f2bdc0..84511f0e9 100644 --- a/src/components/Select/select.scss +++ b/src/components/Select/select.scss @@ -235,6 +235,32 @@ outline: none; } } + + &__icons-single-plugin { + position: absolute; + right: $s-2; + top: 20px; + display: flex; + + @include mq($from: md) { + opacity: 0; + } + + &--visible, + &:hover, + &:focus { + background: $white; + border-radius: $base-border-radius; + opacity: 1; + } + + &.sb-select-inner__chevron-dropdown { + padding: 6px; + color: $black; + border-radius: 0 8px 8px 0; + cursor: pointer; + } + } } .sb-select-inner--error:hover, diff --git a/src/components/TextField/SbTextField.vue b/src/components/TextField/SbTextField.vue index 2741265d7..9a8ad7d76 100644 --- a/src/components/TextField/SbTextField.vue +++ b/src/components/TextField/SbTextField.vue @@ -313,13 +313,19 @@ export default { }, }, + watch: { + autofocus(val) { + if (val) this.handleAutoFocus() + }, + }, + mounted() { - this.handleAutoFocus() + if (this.autofocus) this.handleAutoFocus() }, methods: { handleAutoFocus() { - this.$refs.textfield?.focus() + this.$nextTick(() => this.$refs.textfield?.focus()) }, handleShowHidePassword() { From 818ff505c77373a1f68fa5ce3d90b601a390bf75 Mon Sep 17 00:00:00 2001 From: Henry Okonkwo Date: Tue, 24 Oct 2023 11:00:31 +0200 Subject: [PATCH 2/2] feat(FT-329): use base-border-radius variable --- src/components/Select/select.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Select/select.scss b/src/components/Select/select.scss index 84511f0e9..ef2e4d641 100644 --- a/src/components/Select/select.scss +++ b/src/components/Select/select.scss @@ -257,7 +257,7 @@ &.sb-select-inner__chevron-dropdown { padding: 6px; color: $black; - border-radius: 0 8px 8px 0; + border-radius: 0 $base-border-radius $base-border-radius 0; cursor: pointer; } }