Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 8ef37dc

Browse files
authored
Merge pull request #5740 from trufflesuite/dash-fix-long-request-no-buttons
dashboard: Fix decoding text overflow
2 parents 94dda0c + 267b451 commit 8ef37dc

File tree

1 file changed

+18
-4
lines changed
  • packages/dashboard/src/components/composed/RPCs/RPC

1 file changed

+18
-4
lines changed

packages/dashboard/src/components/composed/RPCs/RPC/Overview.tsx

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,17 @@ import type { Decoding } from "src/utils/dash";
77
import ChainIcon from "src/components/common/ChainIcon";
88

99
const useStyles = createStyles((theme, _params, getRef) => {
10-
const { colors, colorScheme, white, radius, fontFamilyMonospace, fn } = theme;
10+
const {
11+
colors,
12+
colorScheme,
13+
white,
14+
radius,
15+
spacing,
16+
fontFamilyMonospace,
17+
fn
18+
} = theme;
19+
const buttonsWidth = 234;
20+
1121
return {
1222
container: {
1323
flexWrap: "nowrap",
@@ -40,6 +50,9 @@ const useStyles = createStyles((theme, _params, getRef) => {
4050
}
4151
}
4252
},
53+
info: {
54+
width: `calc(100% - ${buttonsWidth + spacing.xl}px)`
55+
},
4356
methodBadge: {
4457
textTransform: "initial",
4558
cursor: "pointer",
@@ -52,6 +65,8 @@ const useStyles = createStyles((theme, _params, getRef) => {
5265
: colors["yellow"][1]
5366
},
5467
decoding: {
68+
display: "inline-block",
69+
maxWidth: "90%",
5570
fontFamily: fontFamilyMonospace,
5671
fontWeight: 700,
5772
color:
@@ -60,7 +75,7 @@ const useStyles = createStyles((theme, _params, getRef) => {
6075
: colors["truffle-beige"][8]
6176
},
6277
buttons: {
63-
minWidth: 234
78+
minWidth: buttonsWidth
6479
},
6580
button: {
6681
ref: getRef("button"),
@@ -125,7 +140,6 @@ function Overview({
125140
onMouseEnter={onBackEnter}
126141
onMouseLeave={onBackLeave}
127142
position="apart"
128-
spacing={50}
129143
pl={42}
130144
pr={35}
131145
py="lg"
@@ -134,7 +148,7 @@ function Overview({
134148
}`}
135149
tabIndex={0}
136150
>
137-
<Stack align="flex-start" spacing="xs">
151+
<Stack className={classes.info} align="flex-start" spacing="xs">
138152
<Badge
139153
size="lg"
140154
variant="outline"

0 commit comments

Comments
 (0)