@@ -54,7 +54,7 @@ const BottomShade = styled.div`
54
54
display: flex;
55
55
flex-wrap: wrap;
56
56
align-items: center;
57
- gap: 16px ;
57
+ justify-content: space-between ;
58
58
padding: 12px ${ responsiveSize ( 8 , 24 ) } ;
59
59
> * {
60
60
flex-basis: 1;
@@ -81,55 +81,81 @@ const AccountContainer = styled.div`
81
81
}
82
82
` ;
83
83
84
- const DesktopText = styled . span `
85
- display: none;
84
+ const LeftContent = styled . div `
85
+ display: block;
86
+
87
+ & > *:not(:last-child) {
88
+ margin-bottom: 8px;
89
+ }
90
+
86
91
${ landscapeStyle (
87
92
( ) => css `
88
- display: inline;
93
+ display: flex;
94
+ flex-direction: row;
95
+ align-items: center;
96
+ justify-content: center;
97
+ gap: 0 12px;
98
+
99
+ & > *:not(:last-child) {
100
+ margin-bottom: 0;
101
+ }
89
102
`
90
103
) }
91
104
` ;
92
105
106
+ const HoverStyle = css `
107
+ :hover {
108
+ text-decoration: underline;
109
+ color: ${ ( { theme } ) => theme . secondaryBlue } ;
110
+ cursor: pointer;
111
+ }
112
+ ` ;
113
+
114
+ const Address = styled . p `
115
+ ${ HoverStyle }
116
+ margin: 0;
117
+ ` ;
118
+
93
119
const Timestamp = styled . label `
94
120
color: ${ ( { theme } ) => theme . secondaryText } ;
121
+ ${ HoverStyle }
95
122
` ;
96
123
97
- const MobileText = styled . span `
124
+ const DesktopText = styled . span `
125
+ display: none;
98
126
${ landscapeStyle (
99
127
( ) => css `
100
- display: none ;
128
+ display: inline ;
101
129
`
102
130
) }
103
131
` ;
104
132
105
- const StyledLink = styled ( Link ) `
106
- height: fit-content;
107
- display: flex;
108
- margin-left: auto;
109
- gap: ${ responsiveSize ( 5 , 6 ) } ;
133
+ const MobileText = styled . span `
110
134
${ landscapeStyle (
111
135
( ) => css `
112
- > svg {
113
- width: 16px;
114
- fill: ${ ( { theme } ) => theme . primaryBlue } ;
115
- }
136
+ display: none;
116
137
`
117
138
) }
118
139
` ;
119
140
120
- const StyledA = styled . a `
121
- :hover {
122
- text-decoration: underline;
123
- p {
124
- color: ${ ( { theme } ) => theme . primaryBlue } ;
125
- }
126
- label {
127
- cursor: pointer;
128
- color: ${ ( { theme } ) => theme . primaryBlue } ;
129
- }
141
+ const StyledLink = styled ( Link ) `
142
+ display: flex;
143
+ gap: ${ responsiveSize ( 5 , 6 ) } ;
144
+ > svg {
145
+ width: 16px;
146
+ fill: ${ ( { theme } ) => theme . primaryBlue } ;
147
+ }
148
+
149
+ :hover svg {
150
+ transition: fill 0.1s;
151
+ fill: ${ ( { theme } ) => theme . secondaryBlue } ;
130
152
}
131
153
` ;
132
154
155
+ const FileLinkContainer = styled . div `
156
+ margin-left: auto;
157
+ ` ;
158
+
133
159
const AttachedFileText : React . FC = ( ) => (
134
160
< >
135
161
< DesktopText > View attached file</ DesktopText >
@@ -175,20 +201,24 @@ const EvidenceCard: React.FC<IEvidenceCard> = ({
175
201
) }
176
202
</ TextContainer >
177
203
< BottomShade >
178
- < AccountContainer >
179
- < Identicon size = "24" string = { sender } />
180
- < StyledA href = { addressExplorerLink } rel = "noopener noreferrer" target = "_blank" >
181
- < p > { shortenAddress ( sender ) } </ p >
182
- </ StyledA >
183
- </ AccountContainer >
184
- < StyledA href = { transactionExplorerLink } rel = "noopener noreferrer" target = "_blank" >
185
- < Timestamp > { formatDate ( Number ( timestamp ) , true ) } </ Timestamp >
186
- </ StyledA >
187
- { fileURI && fileURI !== "-" ? (
188
- < StyledLink to = { `attachment/?url=${ getIpfsUrl ( fileURI ) } ` } >
189
- < AttachmentIcon />
190
- < AttachedFileText />
204
+ < LeftContent >
205
+ < AccountContainer >
206
+ < Identicon size = "24" string = { sender } />
207
+ < StyledLink to = { addressExplorerLink } rel = "noopener noreferrer" target = "_blank" >
208
+ < Address > { shortenAddress ( sender ) } </ Address >
209
+ </ StyledLink >
210
+ </ AccountContainer >
211
+ < StyledLink to = { transactionExplorerLink } rel = "noopener noreferrer" target = "_blank" >
212
+ < Timestamp > { formatDate ( Number ( timestamp ) , true ) } </ Timestamp >
191
213
</ StyledLink >
214
+ </ LeftContent >
215
+ { fileURI && fileURI !== "-" ? (
216
+ < FileLinkContainer >
217
+ < StyledLink to = { `attachment/?url=${ getIpfsUrl ( fileURI ) } ` } >
218
+ < AttachmentIcon />
219
+ < AttachedFileText />
220
+ </ StyledLink >
221
+ </ FileLinkContainer >
192
222
) : null }
193
223
</ BottomShade >
194
224
</ StyledCard >
0 commit comments