Skip to content

Commit

Permalink
add color circle behind the color property
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-luger committed Mar 10, 2024
1 parent dcfc904 commit 561b448
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion components/AuctionDetails/AuctionDetails.tsx
Expand Up @@ -200,7 +200,28 @@ function AuctionDetails(props: Props) {
decSplits.forEach(split => {
hexSplits.push(parseInt(split).toString(16).padStart(2, '0'))
})
return <Tooltip type="hover" content={<span>{hexSplits.join('')}</span>} tooltipContent={value} />
return (
<Tooltip
type="hover"
content={
<span>
<span>{hexSplits.join('')}</span>{' '}
<span
style={{
textAlign: 'center',
display: 'inline-block',
width: '16px',
height: '16px',
backgroundColor: `#${hexSplits.join('')}`,
borderRadius: '50%',
marginLeft: '4px'
}}
></span>
</span>
}
tooltipContent={value}
/>
)
}

if (!isNaN(value)) {
Expand Down

0 comments on commit 561b448

Please sign in to comment.