Skip to content

Commit

Permalink
fix(BaseDropdown): allow same shape as BaseButton
Browse files Browse the repository at this point in the history
  • Loading branch information
stafyniaksacha committed Aug 31, 2023
1 parent b28bc88 commit d5224f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions components/base/BaseDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const props = withDefaults(
/**
* The shape of the dropdown.
*/
shape?: 'straight' | 'rounded' | 'smooth' | 'curved'
shape?: 'straight' | 'rounded' | 'smooth' | 'curved' | 'full'
/**
* The orientation of the dropdown.
Expand Down Expand Up @@ -71,11 +71,11 @@ const props = withDefaults(
color: 'white',
label: '',
headerLabel: undefined,
}
},
)
const appConfig = useAppConfig()
const shape = computed(
() => props.shape ?? appConfig.nui.defaultShapes?.dropdown
() => props.shape ?? appConfig.nui.defaultShapes?.dropdown,
)
const orientationStyle = {
Expand All @@ -91,6 +91,7 @@ const shapeStyle = {
rounded: 'nui-menu-rounded',
smooth: 'nui-menu-smooth',
curved: 'nui-menu-curved',
full: 'nui-menu-curved',
}
const colorStyle = {
white: 'nui-menu-white',
Expand All @@ -109,7 +110,7 @@ const colorStyle = {
<template>
<div class="nui-dropdown" :class="[orientationStyle[props.orientation]]">
<Menu
v-slot="{ open, close }: { open: boolean, close: () => void }"
v-slot="{ open, close }: { open: boolean; close: () => void }"
as="div"
class="nui-menu"
>
Expand Down
2 changes: 1 addition & 1 deletion nuxt.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default defineNuxtSchema({
/**
* Default shape for the BaseDropdown component
*
* @type {'straight' | 'rounded' | 'smooth' | 'curved'}
* @type {'straight' | 'rounded' | 'smooth' | 'curved' | 'full'}
*/
dropdown: 'rounded',
/**
Expand Down

0 comments on commit d5224f7

Please sign in to comment.