Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
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
LuckySwap
interface
Commits
575660d3
Unverified
Commit
575660d3
authored
Aug 23, 2022
by
Connor McEwen
Committed by
GitHub
Aug 23, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: respect padding in cells with proper hover (#4451)
parent
1e692491
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
TokenRow.tsx
src/components/Tokens/TokenTable/TokenRow.tsx
+17
-3
TokenTable.tsx
src/components/Tokens/TokenTable/TokenTable.tsx
+0
-1
No files found.
src/components/Tokens/TokenTable/TokenRow.tsx
View file @
575660d3
...
@@ -42,7 +42,7 @@ const Cell = styled.div`
...
@@ -42,7 +42,7 @@ const Cell = styled.div`
align-items: center;
align-items: center;
justify-content: center;
justify-content: center;
`
`
const
StyledTokenRow
=
styled
.
div
`
const
StyledTokenRow
=
styled
.
div
<
{
first
?:
boolean
;
last
?:
boolean
}
>
`
width: 100%;
width: 100%;
height: 60px;
height: 60px;
display: grid;
display: grid;
...
@@ -52,10 +52,14 @@ const StyledTokenRow = styled.div`
...
@@ -52,10 +52,14 @@ const StyledTokenRow = styled.div`
max-width:
${
MAX_WIDTH_MEDIA_BREAKPOINT
}
;
max-width:
${
MAX_WIDTH_MEDIA_BREAKPOINT
}
;
min-width: 390px;
min-width: 390px;
padding: 0px 12px;
padding-top:
${({
first
})
=>
(
first
?
'
4px
'
:
'
0px
'
)}
;
padding-bottom:
${({
last
})
=>
(
last
?
'
4px
'
:
'
0px
'
)}
;
padding-left: 12px;
padding-right: 12px;
&:hover {
&:hover {
background-color:
${({
theme
})
=>
theme
.
accentActionSoft
}
;
background-color:
${({
theme
})
=>
theme
.
accentActionSoft
}
;
${({
last
})
=>
last
&&
'
border-radius: 0px 0px 8px 8px;
'
}
}
}
@media only screen and (max-width:
${
MAX_WIDTH_MEDIA_BREAKPOINT
}
) {
@media only screen and (max-width:
${
MAX_WIDTH_MEDIA_BREAKPOINT
}
) {
...
@@ -349,6 +353,8 @@ export function TokenRow({
...
@@ -349,6 +353,8 @@ export function TokenRow({
marketCap
,
marketCap
,
volume
,
volume
,
sparkLine
,
sparkLine
,
first
,
last
,
}:
{
}:
{
address
:
ReactNode
address
:
ReactNode
header
:
boolean
header
:
boolean
...
@@ -360,6 +366,8 @@ export function TokenRow({
...
@@ -360,6 +366,8 @@ export function TokenRow({
marketCap
:
ReactNode
marketCap
:
ReactNode
volume
:
ReactNode
volume
:
ReactNode
sparkLine
:
ReactNode
sparkLine
:
ReactNode
first
?:
boolean
last
?:
boolean
})
{
})
{
const
rowCells
=
(
const
rowCells
=
(
<>
<>
...
@@ -374,7 +382,11 @@ export function TokenRow({
...
@@ -374,7 +382,11 @@ export function TokenRow({
</>
</>
)
)
if
(
header
)
return
<
StyledHeaderRow
>
{
rowCells
}
</
StyledHeaderRow
>
if
(
header
)
return
<
StyledHeaderRow
>
{
rowCells
}
</
StyledHeaderRow
>
return
<
StyledTokenRow
>
{
rowCells
}
</
StyledTokenRow
>
return
(
<
StyledTokenRow
first=
{
first
}
last=
{
last
}
>
{
rowCells
}
</
StyledTokenRow
>
)
}
}
/* Header Row: top header row component for table */
/* Header Row: top header row component for table */
...
@@ -532,6 +544,8 @@ export default function LoadedRow({
...
@@ -532,6 +544,8 @@ export default function LoadedRow({
<
ParentSize
>
{
({
width
,
height
})
=>
<
SparklineChart
width=
{
width
}
height=
{
height
}
/>
}
</
ParentSize
>
<
ParentSize
>
{
({
width
,
height
})
=>
<
SparklineChart
width=
{
width
}
height=
{
height
}
/>
}
</
ParentSize
>
</
SparkLine
>
</
SparkLine
>
}
}
first=
{
tokenListIndex
===
0
}
last=
{
tokenListIndex
===
tokenListLength
-
1
}
/>
/>
</
StyledLink
>
</
StyledLink
>
)
)
...
...
src/components/Tokens/TokenTable/TokenTable.tsx
View file @
575660d3
...
@@ -44,7 +44,6 @@ const NoTokenDisplay = styled.div`
...
@@ -44,7 +44,6 @@ const NoTokenDisplay = styled.div`
gap: 8px;
gap: 8px;
`
`
const
TokenRowsContainer
=
styled
.
div
`
const
TokenRowsContainer
=
styled
.
div
`
padding: 4px 0px;
width: 100%;
width: 100%;
`
`
...
...
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