From 570b82d1e71719c06597720b85bdfdab689693dd Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Mon, 22 May 2023 12:24:17 +0200 Subject: [PATCH] chore(Avatar): allow default value for `chipColor` through `app.config.ts` --- src/runtime/app.config.ts | 1 + src/runtime/components/elements/Avatar.vue | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/runtime/app.config.ts b/src/runtime/app.config.ts index 0ff75cca..cd2358ff 100644 --- a/src/runtime/app.config.ts +++ b/src/runtime/app.config.ts @@ -41,6 +41,7 @@ const avatar = { }, default: { size: 'sm', + chipColor: null, chipVariant: 'solid', chipPosition: 'top-right' } diff --git a/src/runtime/components/elements/Avatar.vue b/src/runtime/components/elements/Avatar.vue index 9eb2440f..a2e19780 100644 --- a/src/runtime/components/elements/Avatar.vue +++ b/src/runtime/components/elements/Avatar.vue @@ -43,7 +43,7 @@ export default defineComponent({ }, chipColor: { type: String, - default: null, + default: () => appConfig.ui.avatar.default.chipColor, validator (value: string) { return ['gray', ...appConfig.ui.colors].includes(value) }