Skip to content

Commit 3085682

Browse files
committed
fix signature types and add icon in mini card to see complete content
1 parent 353eba2 commit 3085682

File tree

2 files changed

+71
-26
lines changed

2 files changed

+71
-26
lines changed

src/components/MiniCard.tsx

Lines changed: 69 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
import { Box } from "@mantine/core";
1+
import { Box, Tooltip } from "@mantine/core";
22
import { ReactElement } from "react";
33
import { notifications } from "@mantine/notifications";
4-
import { IconCopy } from '@tabler/icons-react';
4+
import { IconCopy, IconEye } from "@tabler/icons-react";
55

6-
export function MiniCard(args: { title: string, value: ReactElement | string, shortValue?: string }) {
6+
export function MiniCard(args: {
7+
title: string;
8+
value: ReactElement | string;
9+
shortValue?: string;
10+
}) {
711
const copyContent = async () => {
812
if (typeof args.value === "string") {
913
try {
@@ -21,28 +25,69 @@ export function MiniCard(args: { title: string, value: ReactElement | string, sh
2125
});
2226
}
2327
}
24-
}
28+
};
2529

2630
return (
27-
<Box style={{
28-
border: "1px solid #f0f0f0",
29-
borderRadius: 4,
30-
padding: 16,
31-
marginBottom: 16,
32-
marginLeft: 8,
33-
marginRight: 8
34-
}}>
35-
<div style={{
36-
fontSize: 12,
37-
color: "#666",
38-
display: "flex",
39-
flexDirection: "row",
40-
justifyContent: "space-between"
41-
}}>{args.title}{args.shortValue && <IconCopy cursor="pointer" onClick={copyContent} size="1rem" stroke={1.5} />}</div>
42-
<div style={{
43-
fontWeight: 600,
44-
color: "#333"
45-
}}>{args.shortValue || args.value}</div>
31+
<Box
32+
style={{
33+
border: "1px solid #f0f0f0",
34+
borderRadius: 4,
35+
padding: 16,
36+
marginBottom: 16,
37+
marginLeft: 8,
38+
marginRight: 8,
39+
}}
40+
>
41+
<div
42+
style={{
43+
fontSize: 12,
44+
color: "#666",
45+
display: "flex",
46+
flexDirection: "row",
47+
justifyContent: "space-between",
48+
}}
49+
>
50+
{args.title}
51+
{args.shortValue && (
52+
<div
53+
style={{
54+
display: "flex",
55+
flexDirection: "row",
56+
columnGap: "10px",
57+
}}
58+
>
59+
<Tooltip
60+
label={
61+
<div
62+
style={{
63+
maxWidth: "800px",
64+
whiteSpace: "normal",
65+
wordWrap: "break-word",
66+
}}
67+
>
68+
{args.value}
69+
</div>
70+
}
71+
>
72+
<IconEye cursor="pointer" size="1rem" stroke={1.5}></IconEye>
73+
</Tooltip>
74+
<IconCopy
75+
cursor="pointer"
76+
onClick={copyContent}
77+
size="1rem"
78+
stroke={1.5}
79+
/>
80+
</div>
81+
)}
82+
</div>
83+
<div
84+
style={{
85+
fontWeight: 600,
86+
color: "#333",
87+
}}
88+
>
89+
{args.shortValue || args.value}
90+
</div>
4691
</Box>
47-
)
92+
);
4893
}

src/sections/Message.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,15 +343,15 @@ export function StatefulMessage(props: {
343343
target="_blank"
344344
rel="noreferrer"
345345
>
346-
EIP 1271
346+
ERC-1271
347347
</a>
348348
) : (
349349
<a
350350
href="https://eips.ethereum.org/EIPS/eip-6492"
351351
target="_blank"
352352
rel="noreferrer"
353353
>
354-
EIP 6492
354+
ERC-6492
355355
</a>
356356
)}
357357
</div>

0 commit comments

Comments
 (0)