File tree Expand file tree Collapse file tree 1 file changed +21
-9
lines changed
site/src/components/AvatarCard Expand file tree Collapse file tree 1 file changed +21
-9
lines changed Original file line number Diff line number Diff line change 1
1
import { type ReactNode } from "react" ;
2
- import { Avatar , AvatarIcon } from "components/Avatar/Avatar" ;
2
+ import { Avatar } from "components/Avatar/Avatar" ;
3
3
import { type CSSObject , useTheme } from "@emotion/react" ;
4
4
5
5
type AvatarCardProps = {
6
- header : ReactNode ;
6
+ header : string ;
7
7
imgUrl : string ;
8
8
altText : string ;
9
9
@@ -32,8 +32,22 @@ export function AvatarCard({
32
32
cursor : "default" ,
33
33
} }
34
34
>
35
- < div css = { { marginRight : "auto" } } >
36
- < div css = { theme . typography . body1 as CSSObject } > { header } </ div >
35
+ < div css = { { marginRight : "auto" , minWidth : 0 } } >
36
+ < h3
37
+ title = { header }
38
+ css = { [
39
+ theme . typography . body1 as CSSObject ,
40
+ {
41
+ lineHeight : 1.5 ,
42
+ margin : 0 ,
43
+ overflow : "hidden" ,
44
+ whiteSpace : "nowrap" ,
45
+ textOverflow : "ellipsis" ,
46
+ } ,
47
+ ] }
48
+ >
49
+ { header }
50
+ </ h3 >
37
51
38
52
{ subtitle && (
39
53
< div
@@ -47,11 +61,9 @@ export function AvatarCard({
47
61
) }
48
62
</ div >
49
63
50
- < div >
51
- < Avatar >
52
- < AvatarIcon src = { imgUrl } alt = { altText } />
53
- </ Avatar >
54
- </ div >
64
+ < Avatar src = { imgUrl } alt = { altText } colorScheme = "darken" >
65
+ { header }
66
+ </ Avatar >
55
67
</ article >
56
68
) ;
57
69
}
You can’t perform that action at this time.
0 commit comments