Skip to content

Commit

Permalink
refactor: update enums
Browse files Browse the repository at this point in the history
  • Loading branch information
gabaldon committed Sep 4, 2024
1 parent 03e98e8 commit 0743029
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/components/Select/WSelect.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions src/components/Select/WSelect.ts
Original file line number Diff line number Diff line change
@@ -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)
4 changes: 2 additions & 2 deletions src/components/Select/WSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const props = defineProps({
},
dropdownPosition: {
type: String as PropType<DropdownPosition>,
default: DropdownPosition.bottom,
default: DropdownPosition.Bottom,
validator(value: DropdownPosition) {
return dropdownPostions.includes(value)
}
Expand All @@ -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%')
</script>

<style lang="scss">
Expand Down

0 comments on commit 0743029

Please sign in to comment.