Skip to content

Commit

Permalink
feat: expand mpool params on click (#1484)
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkmc authored Jun 1, 2023
1 parent 43ee603 commit 3bc838a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions react/src/Mpool.css
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
height: 0.5em;
}

.mpool .params{
.mpool .params {
width: 1080px;
text-overflow: ellipsis;
cursor: pointer;
Expand All @@ -128,8 +128,8 @@
white-space: nowrap;
}

.mpool .params:hover{
.mpool .params.expanded {
overflow: visible;
white-space: normal;
width: auto;
white-space: pre
}
6 changes: 5 additions & 1 deletion react/src/Mpool.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ function MpoolMessage(props) {
const i = props.i
const msg = props.msg

const handleParamsClick = (el) => {
el.target.classList.toggle('expanded')
}

return <>
<tr key={"to"}>
<td>To</td>
Expand All @@ -68,7 +72,7 @@ function MpoolMessage(props) {
<tr key={i+"params"}>
<td>Params</td>
<td>
<div className="params">{msg.Params}</div>
<div onClick={handleParamsClick} className="params">{msg.Params}</div>
</td>
</tr>
<tr key={i+"gas-fee-cap"}>
Expand Down

0 comments on commit 3bc838a

Please sign in to comment.