mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-28 02:40:35 +01:00
feat(Avatar): handle icon default from app.config.ts
This commit is contained in:
@@ -55,7 +55,7 @@ If there is an error loading the `src` of the avatar or `src` is null / false a
|
|||||||
|
|
||||||
#### Icon :u-badge{label="Edge" class="ml-2 align-text-bottom !rounded-full" variant="subtle"}
|
#### Icon :u-badge{label="Edge" class="ml-2 align-text-bottom !rounded-full" variant="subtle"}
|
||||||
|
|
||||||
You can use the `icon` prop to display an icon on top of the background, customizable in `ui.avatar.icon`.
|
You can use the `icon` prop to display an icon on top of the background or globally in `ui.avatar.default.icon`. Defaults to `null`.
|
||||||
|
|
||||||
::component-card
|
::component-card
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -113,6 +113,7 @@ const avatar = {
|
|||||||
},
|
},
|
||||||
default: {
|
default: {
|
||||||
size: 'sm',
|
size: 'sm',
|
||||||
|
icon: null,
|
||||||
chipColor: null,
|
chipColor: null,
|
||||||
chipPosition: 'top-right'
|
chipPosition: 'top-right'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
icon: {
|
icon: {
|
||||||
type: String,
|
type: String,
|
||||||
default: null
|
default: () => appConfig.ui.avatar.default.icon
|
||||||
},
|
},
|
||||||
size: {
|
size: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|||||||
Reference in New Issue
Block a user