mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-02-03 21:57:58 +01:00
chore(Avatar): allow override of rounded class
This commit is contained in:
@@ -66,6 +66,10 @@ const props = defineProps({
|
|||||||
placeholderClass: {
|
placeholderClass: {
|
||||||
type: String,
|
type: String,
|
||||||
default: () => $ui.avatar.placeholder
|
default: () => $ui.avatar.placeholder
|
||||||
|
},
|
||||||
|
roundedClass: {
|
||||||
|
type: String,
|
||||||
|
default: () => $ui.avatar.rounded
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -74,14 +78,14 @@ const wrapperClass = computed(() => {
|
|||||||
props.wrapperClass,
|
props.wrapperClass,
|
||||||
props.backgroundClass,
|
props.backgroundClass,
|
||||||
$ui.avatar.size[props.size],
|
$ui.avatar.size[props.size],
|
||||||
props.rounded ? 'rounded-full' : 'rounded-md'
|
props.rounded ? 'rounded-full' : props.roundedClass
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
const avatarClass = computed(() => {
|
const avatarClass = computed(() => {
|
||||||
return classNames(
|
return classNames(
|
||||||
$ui.avatar.size[props.size],
|
$ui.avatar.size[props.size],
|
||||||
props.rounded ? 'rounded-full' : 'rounded-md'
|
props.rounded ? 'rounded-full' : props.roundedClass
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -326,6 +326,7 @@ const pills = {
|
|||||||
const avatar = {
|
const avatar = {
|
||||||
wrapper: 'relative inline-flex items-center justify-center',
|
wrapper: 'relative inline-flex items-center justify-center',
|
||||||
background: 'u-bg-gray-100',
|
background: 'u-bg-gray-100',
|
||||||
|
rounded: 'rounded-md',
|
||||||
placeholder: 'text-xs font-medium leading-none u-text-black truncate',
|
placeholder: 'text-xs font-medium leading-none u-text-black truncate',
|
||||||
size: {
|
size: {
|
||||||
xxxs: 'h-4 w-4 text-xs',
|
xxxs: 'h-4 w-4 text-xs',
|
||||||
|
|||||||
Reference in New Issue
Block a user