Skip to content

Commit

Permalink
fix: update app.config and BaseButton.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
driss-chelouati committed Dec 17, 2023
1 parent 3ccd337 commit 1d7467d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .playground/app.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
export default defineAppConfig({
nuxtIcon: {},
nui: {
BaseButton: {
variant: 'solid',
rounded: 'sm',
color: 'default',
size: 'md',
},
defaultShapes: {
// accordion: 'straight',
// autocompleteItem: 'straight',
Expand Down
3 changes: 3 additions & 0 deletions components/base/BaseButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ const { attributes, is } = useNinjaButton(props)
<component :is="is" v-bind="attributes" :class="classes">
<slot v-if="!props.loading" />
<BasePlaceload v-else class="h-4 w-12 rounded" />
<!-- <pre>
{{ classes }}
</pre> -->
<span v-if="props.badge" :class="badges">
<span v-if="props.badgePulse" class="nui-button-badge-pulse"></span>
<span class="nui-button-badge-inner"></span>
Expand Down
8 changes: 4 additions & 4 deletions composables/default-property.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ export const useNuiDefaultProperty = (
component: string,
property: string,
): Ref<string> => {
const config = (useAppConfig()?.appConfig as any)?.nui
return computed(
() => properties?.[property] ?? config?.[component]?.[property],
)
const config = useAppConfig().nui as any
return computed(() => {
return properties?.[property] ?? config?.[component]?.[property]
})
}

0 comments on commit 1d7467d

Please sign in to comment.