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
f6ffc68e
Unverified
Commit
f6ffc68e
authored
Oct 26, 2022
by
Jordan Frankfurt
Committed by
GitHub
Oct 26, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: update bag header layout (#5005)
* fix: update-bag-header * pr feedback
parent
b3c44f20
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
28 deletions
+26
-28
BagHeader.css.ts
src/nft/components/bag/BagHeader.css.ts
+1
-14
BagHeader.tsx
src/nft/components/bag/BagHeader.tsx
+25
-14
No files found.
src/nft/components/bag/BagHeader.css.ts
View file @
f6ffc68e
import
{
style
}
from
'
@vanilla-extract/css
'
import
{
style
}
from
'
@vanilla-extract/css
'
import
{
headlineSmall
}
from
'
nft/css/common.css
'
import
{
headlineSmall
}
from
'
nft/css/common.css
'
import
{
sprinkles
,
vars
}
from
'
nft/css/sprinkles.css
'
import
{
sprinkles
}
from
'
nft/css/sprinkles.css
'
export
const
header
=
style
([
export
const
header
=
style
([
headlineSmall
,
headlineSmall
,
...
@@ -12,16 +12,3 @@ export const header = style([
...
@@ -12,16 +12,3 @@ export const header = style([
lineHeight
:
'
24px
'
,
lineHeight
:
'
24px
'
,
},
},
])
])
export
const
clearAll
=
style
([
sprinkles
({
color
:
'
textTertiary
'
,
cursor
:
'
pointer
'
,
fontWeight
:
'
semibold
'
,
}),
{
'
:hover
'
:
{
color
:
vars
.
color
.
blue400
,
},
},
])
src/nft/components/bag/BagHeader.tsx
View file @
f6ffc68e
...
@@ -2,10 +2,29 @@ import { Box } from 'nft/components/Box'
...
@@ -2,10 +2,29 @@ import { Box } from 'nft/components/Box'
import
{
Column
,
Row
}
from
'
nft/components/Flex
'
import
{
Column
,
Row
}
from
'
nft/components/Flex
'
import
{
BagCloseIcon
}
from
'
nft/components/icons
'
import
{
BagCloseIcon
}
from
'
nft/components/icons
'
import
{
roundAndPluralize
}
from
'
nft/utils/roundAndPluralize
'
import
{
roundAndPluralize
}
from
'
nft/utils/roundAndPluralize
'
import
{
ThemedText
}
from
'
theme
'
import
styled
from
'
styled-components/macro
'
import
{
ButtonText
,
ThemedText
}
from
'
theme
'
import
*
as
styles
from
'
./BagHeader.css
'
import
*
as
styles
from
'
./BagHeader.css
'
const
ClearButton
=
styled
(
ButtonText
)
`
color:
${({
theme
})
=>
theme
.
textSecondary
}
;
cursor: pointer;
font-weight: 600;
font-size: 14px;
line-height: 16px;
transition: 150ms ease color;
:hover {
color:
${({
theme
})
=>
theme
.
accentActive
}
;
}
`
const
ControlRow
=
styled
.
div
`
align-items: center;
display: flex;
flex-direction: row;
justify-content: space-between;
`
interface
BagHeaderProps
{
interface
BagHeaderProps
{
numberOfAssets
:
number
numberOfAssets
:
number
toggleBag
:
()
=>
void
toggleBag
:
()
=>
void
...
@@ -18,23 +37,15 @@ export const BagHeader = ({ numberOfAssets, toggleBag, resetFlow, isProfilePage
...
@@ -18,23 +37,15 @@ export const BagHeader = ({ numberOfAssets, toggleBag, resetFlow, isProfilePage
<
Column
gap=
"4"
paddingX=
"32"
marginBottom=
"20"
>
<
Column
gap=
"4"
paddingX=
"32"
marginBottom=
"20"
>
<
Row
className=
{
styles
.
header
}
>
<
Row
className=
{
styles
.
header
}
>
<
ThemedText
.
HeadlineSmall
>
{
isProfilePage
?
'
Sell NFTs
'
:
'
My bag
'
}
</
ThemedText
.
HeadlineSmall
>
<
ThemedText
.
HeadlineSmall
>
{
isProfilePage
?
'
Sell NFTs
'
:
'
My bag
'
}
</
ThemedText
.
HeadlineSmall
>
<
Box
display=
"flex"
padding=
"2"
color=
"text
Second
ary"
cursor=
"pointer"
onClick=
{
toggleBag
}
>
<
Box
display=
"flex"
padding=
"2"
color=
"text
Prim
ary"
cursor=
"pointer"
onClick=
{
toggleBag
}
>
<
BagCloseIcon
/>
<
BagCloseIcon
/>
</
Box
>
</
Box
>
</
Row
>
</
Row
>
{
numberOfAssets
>
0
&&
(
{
numberOfAssets
>
0
&&
(
<
Box
fontSize=
"14"
fontWeight=
"normal"
style=
{
{
lineHeight
:
'
20px
'
}
}
color=
"textPrimary"
>
<
ControlRow
>
{
roundAndPluralize
(
numberOfAssets
,
'
NFT
'
)
}
·
{
'
'
}
<
ThemedText
.
BodyPrimary
>
{
roundAndPluralize
(
numberOfAssets
,
'
NFT
'
)
}
</
ThemedText
.
BodyPrimary
>
<
Box
<
ClearButton
onClick=
{
resetFlow
}
>
Clear all
</
ClearButton
>
as=
"span"
</
ControlRow
>
className=
{
styles
.
clearAll
}
onClick=
{
()
=>
{
resetFlow
()
}
}
>
Clear all
</
Box
>
</
Box
>
)
}
)
}
</
Column
>
</
Column
>
)
)
...
...
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