Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
c04ffce2
Commit
c04ffce2
authored
Sep 08, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
details item
parent
10560733
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
90 additions
and
2 deletions
+90
-2
tx.ts
data/tx.ts
+30
-0
info.svg
icons/info.svg
+3
-0
Tooltip.ts
theme/components/Tooltip.ts
+1
-1
DetailsInfoItem.tsx
ui/shared/DetailsInfoItem.tsx
+34
-0
TxDetails.tsx
ui/tx/TxDetails.tsx
+22
-1
No files found.
data/tx.ts
0 → 100644
View file @
c04ffce2
export
const
tx
=
{
hash
:
'
0x1ea365d2144796f793883534aa51bf20d23292b19478994eede23dfc599e7c34
'
,
status
:
'
success
'
,
block_num
:
15006918
,
confirmation_num
:
283
,
confirmation_duration
:
30
,
timestamp
:
1662623567695
,
address_from
:
'
0x97Aa2EfcF35c0f4c9AaDDCa8c2330fa7A9533830
'
,
address_to
:
'
0x97Aa2EfcF35c0f4c9AaDDCa8c2330fa7A9533830
'
,
amount
:
{
value
:
0.03
,
value_usd
:
35.5
,
},
fee
:
{
value
:
0.002395904453623692
,
value_usd
:
2.84
,
},
gas_price
:
0.000000017716513811
,
gas_limit
:
208420
,
gas_used
:
159319
,
gas_fees
:
{
base
:
13.538410068
,
max
:
20.27657523
,
max_priority
:
1.5
,
},
burnt_fees
:
{
value
:
0.002156925953623692
,
value_usd
:
2.55
,
},
};
icons/info.svg
0 → 100644
View file @
c04ffce2
<svg
viewBox=
"0 0 20 20"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"M13.034 3H6.965C4.587 3 3 4.703 3 7.141v5.718C3 15.299 4.583 17 6.965 17h6.068C15.416 17 17 15.3 17 12.859V7.14C17 4.701 15.416 3 13.034 3ZM6.965 4.05h6.069c1.785 0 2.916 1.214 2.916 3.091v5.718c0 1.877-1.13 3.091-2.917 3.091H6.966c-1.786 0-2.916-1.214-2.916-3.091V7.14c0-1.874 1.134-3.091 2.915-3.091ZM10 6.818a.525.525 0 0 1 .072 1.045l-.079.005a.525.525 0 0 1-.07-1.045l.077-.005Zm-.007 2.221c.266 0 .486.198.52.454l.005.071v3.093a.525.525 0 0 1-1.045.072l-.005-.072V9.564c0-.29.235-.525.525-.525Z"
fill=
"currentColor"
/>
</svg>
theme/components/Tooltip.ts
View file @
c04ffce2
...
@@ -35,7 +35,7 @@ const baseStyle = defineStyle((props) => {
...
@@ -35,7 +35,7 @@ const baseStyle = defineStyle((props) => {
[
$bg
.
variable
]:
`colors.
${
bg
}
`
,
[
$bg
.
variable
]:
`colors.
${
bg
}
`
,
[
$fg
.
reference
]:
`colors.
${
fg
}
`
,
[
$fg
.
reference
]:
`colors.
${
fg
}
`
,
[
$arrowBg
.
variable
]:
$bg
.
reference
,
[
$arrowBg
.
variable
]:
$bg
.
reference
,
maxWidth
:
'
unset
'
,
maxWidth
:
props
.
maxWidth
||
props
.
maxW
||
'
unset
'
,
};
};
});
});
...
...
ui/shared/DetailsInfoItem.tsx
0 → 100644
View file @
c04ffce2
import
{
GridItem
,
Icon
,
Flex
,
Tooltip
,
Box
,
Text
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
infoIcon
from
'
icons/info.svg
'
;
interface
Props
{
title
:
string
;
hint
:
string
;
children
:
React
.
ReactNode
;
}
const
DetailsInfoItem
=
({
title
,
hint
,
children
}:
Props
)
=>
{
return
(
<>
<
GridItem
>
<
Flex
columnGap=
{
2
}
alignItems=
"center"
>
<
Tooltip
label=
{
hint
}
placement=
"top"
maxW=
"320px"
>
<
Box
cursor=
"pointer"
display=
"inherit"
>
<
Icon
as=
{
infoIcon
}
boxSize=
{
5
}
/>
</
Box
>
</
Tooltip
>
<
Text
fontWeight=
{
500
}
whiteSpace=
"nowrap"
>
{
title
}
</
Text
>
</
Flex
>
</
GridItem
>
<
GridItem
display=
"flex"
alignItems=
"center"
>
{
children
}
</
GridItem
>
</>
);
};
export
default
DetailsInfoItem
;
ui/tx/TxDetails.tsx
View file @
c04ffce2
import
{
Grid
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
{
tx
}
from
'
data/tx
'
;
import
CopyToClipboard
from
'
ui/shared/CopyToClipboard
'
;
import
DetailsInfoItem
from
'
ui/shared/DetailsInfoItem
'
;
const
TxDetails
=
()
=>
{
const
TxDetails
=
()
=>
{
return
<
div
>
TxDetails component
</
div
>;
return
(
<
Grid
columnGap=
{
8
}
rowGap=
{
3
}
templateColumns=
"auto 1fr"
>
<
DetailsInfoItem
title=
"Transaction hash"
hint=
"Unique character string (TxID) assigned to every verified transaction."
>
{
tx
.
hash
}
<
CopyToClipboard
text=
{
tx
.
hash
}
/>
</
DetailsInfoItem
>
<
DetailsInfoItem
title=
"Status"
hint=
"Current transaction state: Success, Failed (Error), or Pending (In Process)"
>
{
tx
.
status
}
</
DetailsInfoItem
>
</
Grid
>
);
};
};
export
default
TxDetails
;
export
default
TxDetails
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment