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