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
f464b9ab
Commit
f464b9ab
authored
Feb 07, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scroll
parent
166046d7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
7 deletions
+39
-7
TxDetailsAction.tsx
ui/tx/details/TxDetailsAction.tsx
+9
-5
TxDetailsActions.tsx
ui/tx/details/TxDetailsActions.tsx
+30
-2
No files found.
ui/tx/details/TxDetailsAction.tsx
View file @
f464b9ab
...
@@ -67,17 +67,19 @@ const TxDetailsAction = ({ action }: Props) => {
...
@@ -67,17 +67,19 @@ const TxDetailsAction = ({ action }: Props) => {
/>
/>
<
chakra
.
span
color=
"text_secondary"
>
{
text1
}
</
chakra
.
span
>
<
chakra
.
span
color=
"text_secondary"
>
{
text1
}
</
chakra
.
span
>
<
Flex
columnGap=
{
1
}
>
<
Icon
as=
{
uniswapIcon
}
boxSize=
{
5
}
color=
"white"
bgColor=
"#ff007a"
borderRadius=
"full"
p=
"2px"
/>
<
Icon
as=
{
uniswapIcon
}
boxSize=
{
5
}
color=
"white"
bgColor=
"#ff007a"
borderRadius=
"full"
p=
"2px"
/>
<
chakra
.
span
color=
"text_secondary"
>
Uniswap V3
</
chakra
.
span
>
<
chakra
.
span
color=
"text_secondary"
>
Uniswap V3
</
chakra
.
span
>
</
Flex
>
</
Flex
>
</
Flex
>
);
);
}
}
case
'
mint_nft
'
:
{
case
'
mint_nft
'
:
{
return
(
return
(
<
div
>
<
div
>
<
Flex
rowGap=
{
2
}
flexWrap=
"wrap"
whiteSpace=
"pre-wrap"
>
<
Flex
rowGap=
{
2
}
flexWrap=
"wrap"
alignItems=
"center"
whiteSpace=
"pre-wrap"
>
<
span
>
Mint of
</
span
>
<
chakra
.
span
>
Mint of
</
chakra
.
span
>
<
TokenSnippet
<
TokenSnippet
name=
{
data
.
name
}
name=
{
data
.
name
}
hash=
{
data
.
address
}
hash=
{
data
.
address
}
...
@@ -85,8 +87,10 @@ const TxDetailsAction = ({ action }: Props) => {
...
@@ -85,8 +87,10 @@ const TxDetailsAction = ({ action }: Props) => {
w=
"auto"
w=
"auto"
columnGap=
{
1
}
columnGap=
{
1
}
logoSize=
{
5
}
logoSize=
{
5
}
rowGap=
{
2
}
flexWrap=
"wrap"
/>
/>
<
span
>
to
</
span
>
<
chakra
.
span
>
to
</
chakra
.
span
>
<
AddressLink
hash=
{
data
.
to
}
type=
"address"
truncation=
"constant"
/>
<
AddressLink
hash=
{
data
.
to
}
type=
"address"
truncation=
"constant"
/>
</
Flex
>
</
Flex
>
...
...
ui/tx/details/TxDetailsActions.tsx
View file @
f464b9ab
import
{
Flex
}
from
'
@chakra-ui/react
'
;
import
{
Flex
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
TxAction
}
from
'
types/api/txAction
'
;
import
type
{
TxAction
}
from
'
types/api/txAction
'
;
...
@@ -12,17 +12,45 @@ interface Props {
...
@@ -12,17 +12,45 @@ interface Props {
}
}
const
TxDetailsActions
=
({
actions
}:
Props
)
=>
{
const
TxDetailsActions
=
({
actions
}:
Props
)
=>
{
const
containerRef
=
React
.
useRef
<
HTMLDivElement
>
(
null
);
const
[
hasScroll
,
setHasScroll
]
=
React
.
useState
(
false
);
const
gradientStartColor
=
useColorModeValue
(
'
whiteAlpha.600
'
,
'
blackAlpha.600
'
);
const
gradientEndColor
=
useColorModeValue
(
'
whiteAlpha.900
'
,
'
blackAlpha.900
'
);
React
.
useEffect
(()
=>
{
if
(
!
containerRef
.
current
)
{
return
;
}
setHasScroll
(
containerRef
.
current
.
scrollHeight
>
containerRef
.
current
.
clientHeight
);
},
[]);
return
(
return
(
<
DetailsInfoItem
<
DetailsInfoItem
title=
"Transaction Action"
title=
"Transaction Action"
hint=
"Highlighted events of the transaction"
hint=
"Highlighted events of the transaction"
note=
"Scroll to see more"
note=
{
hasScroll
?
'
Scroll to see more
'
:
undefined
}
position=
"relative"
>
>
<
Flex
<
Flex
flexDirection=
"column"
flexDirection=
"column"
alignItems=
"flex-start"
alignItems=
"flex-start"
rowGap=
{
5
}
rowGap=
{
5
}
w=
"100%"
w=
"100%"
maxH=
"200px"
overflowY=
"scroll"
ref=
{
containerRef
}
_after=
{
hasScroll
?
{
position
:
'
absolute
'
,
content
:
'
""
'
,
bottom
:
0
,
left
:
0
,
right
:
'
20px
'
,
height
:
'
48px
'
,
bgGradient
:
`linear(to-b, ${ gradientStartColor } 37.5%, ${ gradientEndColor } 77.5%)`
,
}
:
undefined
}
pr=
{
hasScroll
?
5
:
0
}
pb=
{
hasScroll
?
10
:
0
}
>
>
{
actions
.
map
((
action
,
index
:
number
)
=>
<
TxDetailsAction
key=
{
index
}
action=
{
action
}
/>)
}
{
actions
.
map
((
action
,
index
:
number
)
=>
<
TxDetailsAction
key=
{
index
}
action=
{
action
}
/>)
}
</
Flex
>
</
Flex
>
...
...
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