mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Refactor #3965 - For AvatarGroup
This commit is contained in:
parent
ac398b1c49
commit
4ae07e300b
3 changed files with 45 additions and 14 deletions
37
components/lib/avatargroup/BaseAvatarGroup.vue
Normal file
37
components/lib/avatargroup/BaseAvatarGroup.vue
Normal file
|
@ -0,0 +1,37 @@
|
|||
<script>
|
||||
import BaseComponent from 'primevue/basecomponent';
|
||||
import { useStyle } from 'primevue/usestyle';
|
||||
|
||||
const styles = `
|
||||
.p-avatar-group .p-avatar + .p-avatar {
|
||||
margin-left: -1rem;
|
||||
}
|
||||
|
||||
.p-avatar-group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
`;
|
||||
|
||||
const classes = {
|
||||
root: 'p-avatar-group p-component'
|
||||
};
|
||||
|
||||
const { load: loadStyle } = useStyle(styles, { id: 'primevue_avatargroup_style', manual: true });
|
||||
|
||||
export default {
|
||||
name: 'BaseAvatarGroup',
|
||||
extends: BaseComponent,
|
||||
css: {
|
||||
classes
|
||||
},
|
||||
watch: {
|
||||
isUnstyled: {
|
||||
immediate: true,
|
||||
handler(newValue) {
|
||||
!newValue && loadStyle();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue