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
f27d1191
Unverified
Commit
f27d1191
authored
Nov 17, 2022
by
Charles Bachmeier
Committed by
GitHub
Nov 17, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: Sell bag styling (#5297)
match buy bag styles Co-authored-by:
Charles Bachmeier
<
charlie@genie.xyz
>
parent
f2b85621
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
35 deletions
+34
-35
BagRow.tsx
src/nft/components/bag/BagRow.tsx
+1
-1
ProfileAssetRow.tsx
src/nft/components/bag/profile/ProfileAssetRow.tsx
+31
-32
ListPage.tsx
src/nft/components/profile/list/ListPage.tsx
+2
-2
No files found.
src/nft/components/bag/BagRow.tsx
View file @
f27d1191
...
...
@@ -24,7 +24,7 @@ import styled from 'styled-components/macro'
import
*
as
styles
from
'
./BagRow.css
'
const
RemoveButton
=
styled
(
ThemeButton
)
`
export
const
RemoveButton
=
styled
(
ThemeButton
)
`
border-radius: 12px;
font-size: 14px;
line-height: 16px;
...
...
src/nft/components/bag/profile/ProfileAssetRow.tsx
View file @
f27d1191
import
{
ButtonEmphasis
,
ButtonSize
}
from
'
components/Button
'
import
{
Box
}
from
'
nft/components/Box
'
import
{
Column
,
Row
}
from
'
nft/components/Flex
'
import
{
bodySmall
,
subhead
}
from
'
nft/css/common.cs
s
'
import
{
CircularCloseIcon
,
VerifiedIcon
}
from
'
nft/components/icon
s
'
import
{
useIsMobile
,
useSellAsset
}
from
'
nft/hooks
'
import
{
WalletAsset
}
from
'
nft/types
'
import
{
useState
}
from
'
react
'
import
{
colors
}
from
'
theme/colors
'
import
*
as
styles
from
'
./ProfileAssetRow.css
'
import
{
RemoveButton
}
from
'
../BagRow
'
import
*
as
styles
from
'
../BagRow.css
'
const
ProfileAssetRow
=
({
asset
}:
{
asset
:
WalletAsset
})
=>
{
const
removeAsset
=
useSellAsset
((
state
)
=>
state
.
removeSellAsset
)
...
...
@@ -13,43 +16,39 @@ const ProfileAssetRow = ({ asset }: { asset: WalletAsset }) => {
const
[
hovered
,
setHovered
]
=
useState
(
false
)
const
handleHover
=
()
=>
setHovered
(
!
hovered
)
return
(
<
Row
paddingY=
"8"
position=
"relative"
onMouseEnter=
{
handleHover
}
onMouseLeave=
{
handleHover
}
>
<
div
>
<
Box
display=
{
isMobile
?
'
flex
'
:
'
none
'
}
className=
{
styles
.
removeAsset
}
onClick=
{
(
e
)
=>
{
const
handleRemoveAsset
:
React
.
MouseEventHandler
<
HTMLElement
>
=
(
e
)
=>
{
e
.
preventDefault
()
e
.
stopPropagation
()
removeAsset
(
asset
)
}
}
}
return
(
<
Row
className=
{
styles
.
bagRow
}
onMouseEnter=
{
handleHover
}
onMouseLeave=
{
handleHover
}
>
<
Box
position=
"relative"
display=
"flex"
>
<
Box
display=
{
isMobile
?
'
block
'
:
'
none
'
}
className=
{
styles
.
removeAssetOverlay
}
onClick=
{
handleRemoveAsset
}
transition=
"250"
zIndex=
"1"
>
<
img
className=
{
styles
.
removeIcon
}
src=
"/nft/svgs/minusCircle.svg"
alt=
"Remove item"
/>
</
Box
>
<
img
className=
{
styles
.
tagAssetImage
}
src=
{
asset
.
imageUrl
}
alt=
{
asset
.
name
}
/>
</
div
>
<
Column
gap=
"4"
overflow=
"hidden"
flexWrap=
"nowrap"
>
<
Box
overflow=
"hidden"
textOverflow=
"ellipsis"
whiteSpace=
"nowrap"
className=
{
subhead
}
>
{
asset
.
name
??
`#${asset.tokenId}`
}
<
CircularCloseIcon
/>
</
Box
>
<
Box
overflow=
"hidden"
textOverflow=
"ellipsis"
whiteSpace=
"nowrap"
className=
{
bodySmall
}
>
{
asset
.
collection
?.
name
}
<
img
src=
{
asset
.
smallImageUrl
}
alt=
{
asset
.
name
}
className=
{
styles
.
bagRowImage
}
/>
</
Box
>
<
Column
overflow=
"hidden"
width=
"full"
color=
"textPrimary"
>
<
Row
overflow=
"hidden"
width=
"full"
justifyContent=
"space-between"
whiteSpace=
"nowrap"
gap=
"16"
>
<
Box
className=
{
styles
.
assetName
}
>
{
asset
.
name
||
`#${asset.tokenId}`
}
</
Box
>
</
Row
>
<
Row
overflow=
"hidden"
whiteSpace=
"nowrap"
gap=
"2"
>
<
Box
className=
{
styles
.
collectionName
}
>
{
asset
.
asset_contract
.
name
}
</
Box
>
{
asset
.
collectionIsVerified
&&
<
VerifiedIcon
className=
{
styles
.
icon
}
fill=
{
colors
.
magentaVibrant
}
/>
}
</
Row
>
</
Column
>
{
hovered
&&
!
isMobile
&&
(
<
Box
marginLeft=
"auto"
marginRight=
"0"
className=
{
styles
.
removeBagRowButton
}
onClick=
{
(
e
)
=>
{
e
.
preventDefault
()
e
.
stopPropagation
()
removeAsset
(
asset
)
}
}
>
<
RemoveButton
onClick=
{
handleRemoveAsset
}
emphasis=
{
ButtonEmphasis
.
medium
}
size=
{
ButtonSize
.
medium
}
>
Remove
</
Box
>
</
RemoveButton
>
)
}
</
Row
>
)
...
...
src/nft/components/profile/list/ListPage.tsx
View file @
f27d1191
...
...
@@ -605,10 +605,10 @@ const NFTListRow = ({ asset, globalPriceMethod, globalPrice, setGlobalPrice, sel
/>
</
Box
>
<
Column
gap=
"4"
minWidth=
"0"
>
<
Box
paddingRight=
"8"
overflow=
"hidden"
textOverflow=
"ellipsis"
className=
{
subheadSmall
}
>
<
Box
paddingRight=
"8"
overflow=
"hidden"
textOverflow=
"ellipsis"
whiteSpace=
"nowrap"
className=
{
subheadSmall
}
>
{
asset
.
name
?
asset
.
name
:
`#${asset.tokenId}`
}
</
Box
>
<
Box
paddingRight=
"8"
overflow=
"hidden"
textOverflow=
"ellipsis"
className=
{
bodySmall
}
>
<
Box
paddingRight=
"8"
overflow=
"hidden"
textOverflow=
"ellipsis"
whiteSpace=
"nowrap"
className=
{
bodySmall
}
>
{
asset
.
collection
?.
name
}
{
asset
.
collectionIsVerified
&&
<
VerifiedIcon
style=
{
{
marginBottom
:
'
-5px
'
}
}
/>
}
</
Box
>
...
...
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