chore(Avatar): allow default value for chipColor through app.config.ts

This commit is contained in:
Benjamin Canac
2023-05-22 12:24:17 +02:00
parent b5189c0c07
commit 570b82d1e7
2 changed files with 2 additions and 1 deletions

View File

@@ -41,6 +41,7 @@ const avatar = {
}, },
default: { default: {
size: 'sm', size: 'sm',
chipColor: null,
chipVariant: 'solid', chipVariant: 'solid',
chipPosition: 'top-right' chipPosition: 'top-right'
} }

View File

@@ -43,7 +43,7 @@ export default defineComponent({
}, },
chipColor: { chipColor: {
type: String, type: String,
default: null, default: () => appConfig.ui.avatar.default.chipColor,
validator (value: string) { validator (value: string) {
return ['gray', ...appConfig.ui.colors].includes(value) return ['gray', ...appConfig.ui.colors].includes(value)
} }