@@ -26,102 +26,90 @@ const StyledRiAccountCircleFill = styled(RiAccountCircleFill)({
26
26
} )
27
27
28
28
const AttestantBlockContainer = styled . cite < AttestantBlockChildProps > (
29
- ( props ) => {
30
- const flexDir = props . avatarPosition === "end" ? "row-reverse" : "row"
31
-
32
- return [
33
- {
34
- display : "flex" ,
35
- flexShrink : 0 ,
36
- flexDirection : flexDir ,
37
- width : props . avatarPosition === "end" ? "100%" : "300px" ,
38
- marginLeft : props . avatarPosition === "end" ? "0px" : "24px" ,
39
- ...theme . typography . body3 ,
40
- [ theme . breakpoints . down ( "sm" ) ] : {
41
- width : "100%" ,
42
- height : "56px" ,
43
- marginTop : props . avatarPosition === "end" ? "0px" : "24px" ,
44
- marginLeft : "0px" ,
45
- } ,
46
- } ,
47
- ]
48
- } ,
29
+ ( { avatarPosition } ) => ( {
30
+ display : "flex" ,
31
+ flexShrink : 0 ,
32
+ flexDirection : avatarPosition === "end" ? "row-reverse" : "row" ,
33
+ width : avatarPosition === "end" ? "100%" : "300px" ,
34
+ marginLeft : avatarPosition === "end" ? "0px" : "24px" ,
35
+ ...theme . typography . body3 ,
36
+ [ theme . breakpoints . down ( "sm" ) ] : {
37
+ width : "100%" ,
38
+ height : "56px" ,
39
+ marginTop : avatarPosition === "end" ? "4px" : "24px" ,
40
+ marginLeft : "0px" ,
41
+ } ,
42
+ } ) ,
49
43
)
50
44
51
- const AttestantAvatar = styled . div < AttestantBlockChildProps > ( ( props ) => {
52
- return [
53
- {
54
- marginRight : props . avatarPosition === "end" ? "0px" : "12px" ,
55
- marginLeft : props . avatarPosition === "end" ? "14px" : "0px" ,
56
- img : {
57
- objectFit : "cover" ,
58
- borderRadius : "50%" ,
59
- background : theme . custom . colors . white ,
60
- width : "40px" ,
61
- height : "40px" ,
62
- boxShadow :
63
- "0px 2px 4px 0px rgba(37, 38, 43, 0.10), 0px 2px 4px 0px rgba(37, 38, 43, 0.10)" ,
64
- } ,
65
- [ theme . breakpoints . down ( "sm" ) ] : {
66
- display : props . avatarStyle === "homepage" ? "none" : "block" ,
67
- } ,
45
+ const AttestantAvatar = styled . div < AttestantBlockChildProps > (
46
+ ( { avatarPosition, avatarStyle } ) => ( {
47
+ marginRight : avatarPosition === "end" ? "0px" : "12px" ,
48
+ marginLeft : avatarPosition === "end" ? "14px" : "0px" ,
49
+ display : "flex" ,
50
+ alignItems : "center" ,
51
+ img : {
52
+ objectFit : "cover" ,
53
+ borderRadius : "50%" ,
54
+ background : theme . custom . colors . white ,
55
+ width : "40px" ,
56
+ height : "40px" ,
57
+ boxShadow :
58
+ "0px 2px 4px 0px rgba(37, 38, 43, 0.10), 0px 2px 4px 0px rgba(37, 38, 43, 0.10)" ,
68
59
} ,
69
- ]
70
- } )
71
-
72
- const AttestantNameBlock = styled . div < AttestantBlockChildProps > ( ( props ) => {
73
- return [
74
- {
75
- flexGrow : "1" ,
76
- width : "auto" ,
77
- textAlign : props . avatarPosition === "end" ? "end" : "start" ,
78
- color :
79
- props . color === "light"
80
- ? theme . custom . colors . lightGray2
81
- : theme . custom . colors . silverGrayDark ,
60
+ [ theme . breakpoints . down ( "sm" ) ] : {
61
+ display : avatarStyle === "homepage" ? "none" : "block" ,
82
62
} ,
83
- ]
84
- } )
63
+ } ) ,
64
+ )
65
+
66
+ const AttestantNameBlock = styled . div < AttestantBlockChildProps > (
67
+ ( { avatarPosition, color } ) => ( {
68
+ flexGrow : "1" ,
69
+ width : "auto" ,
70
+ textAlign : avatarPosition === "end" ? "end" : "start" ,
71
+ color :
72
+ color === "light"
73
+ ? theme . custom . colors . lightGray2
74
+ : theme . custom . colors . silverGrayDark ,
75
+ } ) ,
76
+ )
85
77
86
- const AttestantName = styled . div < AttestantBlockChildProps > ( ( props ) => {
87
- const desktopFont =
88
- props . variant === "standard"
89
- ? theme . typography . h5
90
- : theme . typography . subtitle1
91
- return [
92
- {
78
+ const AttestantName = styled . div < AttestantBlockChildProps > (
79
+ ( { variant, color } ) => {
80
+ const desktopFont =
81
+ variant === "standard" ? theme . typography . h5 : theme . typography . subtitle1
82
+ return {
93
83
...desktopFont ,
94
84
whiteSpace : "nowrap" ,
95
85
color :
96
- props . color === "light"
86
+ color === "light"
97
87
? theme . custom . colors . white
98
88
: theme . custom . colors . darkGray2 ,
99
89
lineHeight : "125%" ,
100
90
[ theme . breakpoints . down ( "sm" ) ] : {
101
91
...theme . typography . subtitle1 ,
102
92
} ,
103
- } ,
104
- ]
105
- } )
93
+ }
94
+ } ,
95
+ )
106
96
107
- const AttestantTitle = styled . div < AttestantBlockChildProps > ( ( props ) => {
108
- const desktopFont =
109
- props . variant === "standard"
110
- ? theme . typography . body1
111
- : theme . typography . body3
112
- return [
113
- {
97
+ const AttestantTitle = styled . div < AttestantBlockChildProps > (
98
+ ( { variant, color } ) => {
99
+ const desktopFont =
100
+ variant === "standard" ? theme . typography . body1 : theme . typography . body3
101
+ return {
114
102
...desktopFont ,
115
103
color :
116
- props . color === "light"
104
+ color === "light"
117
105
? theme . custom . colors . lightGray2
118
106
: theme . custom . colors . silverGrayDark ,
119
107
[ theme . breakpoints . down ( "sm" ) ] : {
120
108
...theme . typography . body2 ,
121
109
} ,
122
- } ,
123
- ]
124
- } )
110
+ }
111
+ } ,
112
+ )
125
113
126
114
const AttestantBlock : React . FC < AttestantBlockProps > = ( {
127
115
attestation,
0 commit comments