From 07430297952a69c255baa789abae8cfe8bcb120f Mon Sep 17 00:00:00 2001 From: gabaldon Date: Wed, 4 Sep 2024 11:19:26 +0200 Subject: [PATCH] refactor: update enums --- src/components/Select/WSelect.spec.ts | 4 ++-- src/components/Select/WSelect.ts | 4 ++-- src/components/Select/WSelect.vue | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/Select/WSelect.spec.ts b/src/components/Select/WSelect.spec.ts index 75104af..fa8017b 100644 --- a/src/components/Select/WSelect.spec.ts +++ b/src/components/Select/WSelect.spec.ts @@ -9,7 +9,7 @@ describe('WSelect', () => { const wrapper = shallowMount(WSelect, { emits: ['update:modelValue'], props: { - dropdownPosition: DropdownPosition.bottom, + dropdownPosition: DropdownPosition.Bottom, modelValue: { key: 'en', label: 'English', @@ -36,7 +36,7 @@ describe('WSelect', () => { const wrapper = shallowMount(WSelect, { emits: ['update:modelValue'], props: { - dropdownPosition: DropdownPosition.bottom, + dropdownPosition: DropdownPosition.Bottom, modelValue: { key: 'en', label: 'English', diff --git a/src/components/Select/WSelect.ts b/src/components/Select/WSelect.ts index 2dca31b..e5b0cd4 100644 --- a/src/components/Select/WSelect.ts +++ b/src/components/Select/WSelect.ts @@ -1,6 +1,6 @@ export type Option = {key: string, label: string, icon: string | null} export enum DropdownPosition { - top = 'top', - bottom = 'bottom' + Top = 'top', + Bottom = 'bottom' } export const dropdownPostions = Object.values(DropdownPosition) \ No newline at end of file diff --git a/src/components/Select/WSelect.vue b/src/components/Select/WSelect.vue index 6ffefcf..0a88bfc 100644 --- a/src/components/Select/WSelect.vue +++ b/src/components/Select/WSelect.vue @@ -48,7 +48,7 @@ const props = defineProps({ }, dropdownPosition: { type: String as PropType, - default: DropdownPosition.bottom, + default: DropdownPosition.Bottom, validator(value: DropdownPosition) { return dropdownPostions.includes(value) } @@ -63,7 +63,7 @@ const props = defineProps({ } }) -const position = computed(() => props.dropdownPosition === DropdownPosition.top ? '-210%' : '110%') +const position = computed(() => props.dropdownPosition === DropdownPosition.Top ? '-210%' : '110%')