Commit ae2b4b16 authored by Charles Bachmeier's avatar Charles Bachmeier Committed by GitHub

fix: fix skeleton hover state bug (#4409)

* fix skeleton hover state bug

* corretc hover color

* add transition
Co-authored-by: default avatarCharlie <charlie@uniswap.org>
parent a27f8e29
...@@ -67,11 +67,12 @@ export const suggestionRow = style([ ...@@ -67,11 +67,12 @@ export const suggestionRow = style([
justifyContent: 'space-between', justifyContent: 'space-between',
paddingY: '8', paddingY: '8',
paddingX: '16', paddingX: '16',
transition: '250',
}), }),
{ {
':hover': { ':hover': {
cursor: 'pointer', cursor: 'pointer',
background: vars.color.lightGrayContainer, background: vars.color.lightGrayButton,
}, },
textDecoration: 'none', textDecoration: 'none',
}, },
......
...@@ -8,7 +8,7 @@ import { useSearchHistory } from 'nft/hooks' ...@@ -8,7 +8,7 @@ import { useSearchHistory } from 'nft/hooks'
import { FungibleToken, GenieCollection } from 'nft/types' import { FungibleToken, GenieCollection } from 'nft/types'
import { ethNumberStandardFormatter } from 'nft/utils/currency' import { ethNumberStandardFormatter } from 'nft/utils/currency'
import { putCommas } from 'nft/utils/putCommas' import { putCommas } from 'nft/utils/putCommas'
import { useCallback, useEffect, useReducer, useState } from 'react' import { useCallback, useEffect, useState } from 'react'
import { Link, useNavigate } from 'react-router-dom' import { Link, useNavigate } from 'react-router-dom'
import { TokenWarningRedIcon, VerifiedIcon } from '../../nft/components/icons' import { TokenWarningRedIcon, VerifiedIcon } from '../../nft/components/icons'
...@@ -180,16 +180,9 @@ export const TokenRow = ({ token, isHovered, setHoveredIndex, toggleOpen, index ...@@ -180,16 +180,9 @@ export const TokenRow = ({ token, isHovered, setHoveredIndex, toggleOpen, index
} }
export const SkeletonRow = () => { export const SkeletonRow = () => {
const [isHovered, toggleHovered] = useReducer((s) => !s, false)
return ( return (
<Box className={styles.searchBarDropdown}> <Box className={styles.searchBarDropdown}>
<Row <Row className={styles.suggestionRow}>
background={isHovered ? 'lightGrayButton' : 'none'}
onMouseEnter={toggleHovered}
onMouseLeave={toggleHovered}
className={styles.suggestionRow}
>
<Row> <Row>
<Box className={styles.imageHolder} /> <Box className={styles.imageHolder} />
<Box borderRadius="round" height="16" width="160" background="loading" /> <Box borderRadius="round" height="16" width="160" background="loading" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment