feat: updates

This commit is contained in:
qier222 2022-06-06 01:00:25 +08:00
parent cf7a4528dd
commit 0e58bb6e80
No known key found for this signature in database
GPG key ID: 9C85007ED905F14D
44 changed files with 1027 additions and 496 deletions

View file

@ -12,6 +12,7 @@ const Image = ({
sizes,
placeholder = 'blank',
onClick,
onMouseOver,
}: {
src?: string
srcSet?: string
@ -21,6 +22,7 @@ const Image = ({
lazyLoad?: boolean
placeholder?: 'artist' | 'album' | 'playlist' | 'podcast' | 'blank' | null
onClick?: (e: React.MouseEvent<HTMLImageElement>) => void
onMouseOver?: (e: React.MouseEvent<HTMLImageElement>) => void
}) => {
const [loaded, setLoaded] = useState(false)
const [error, setError] = useState(false)
@ -57,6 +59,7 @@ const Image = ({
initial={{ opacity: 0 }}
transition={transition}
onClick={onClick}
onMouseOver={onMouseOver}
/>
{/* Placeholder / Error fallback */}