File tree Expand file tree Collapse file tree 2 files changed +29
-8
lines changed
Expand file tree Collapse file tree 2 files changed +29
-8
lines changed Original file line number Diff line number Diff line change 11<script setup lang="ts">
22import { computed } from ' vue'
33
4- export type Size = ' nano' | ' mini' | ' small' | ' medium' | ' large'
4+ export type Size =
5+ | ' nano'
6+ | ' mini'
7+ | ' small'
8+ | ' medium'
9+ | ' large'
10+ | ' jumbo'
11+ | ' mega'
12+ | ' fill'
513
614const props = defineProps <{
715 size? : Size
@@ -34,6 +42,14 @@ const initial = computed(() => props.name?.charAt(0).toUpperCase())
3442 overflow : hidden;
3543}
3644
45+ .img {
46+ object-fit : cover;
47+ }
48+
49+ .initial {
50+ font-weight : 500 ;
51+ }
52+
3753.SAvatar.nano {
3854 width : 20 px ;
3955 height : 20 px ;
@@ -64,15 +80,19 @@ const initial = computed(() => props.name?.charAt(0).toUpperCase())
6480 .initial { font-size : 16 px ; }
6581}
6682
67- .SAvatar.no-image {
68- border : 1 px solid var (--c-border-mute-1 );
83+ .SAvatar.jumbo {
84+ width : 48 px ;
85+ height : 48 px ;
86+ .initial { font-size : 16 px ; }
6987}
7088
71- .img {
72- object-fit : cover;
89+ .SAvatar.fill {
90+ width : 100 % ;
91+ aspect-ratio : 1 / 1 ;
92+ .initial { font-size : 20 px ; }
7393}
7494
75- .initial {
76- font-weight : 500 ;
95+ .SAvatar.no-image {
96+ border : 1 px solid var ( --c-border-mute-1 ) ;
7797}
7898 </style >
Original file line number Diff line number Diff line change @@ -9,7 +9,8 @@ const variants = [
99 { title: ' Mini' , size: ' mini' },
1010 { title: ' Small' , size: ' small' },
1111 { title: ' Medium' , size: ' medium' },
12- { title: ' Large' , size: ' large' }
12+ { title: ' Large' , size: ' large' },
13+ { title: ' Jumbo' , size: ' jumbo' }
1314] as const
1415 </script >
1516
You can’t perform that action at this time.
0 commit comments