Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI adjustments #51

Merged
merged 4 commits into from
Aug 24, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move tooltip to NFT image
  • Loading branch information
rvanasa committed Aug 24, 2023
commit 09f85a0224d46322a5794fd71723c8d5d99ea219
34 changes: 17 additions & 17 deletions src/components/NftCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,26 @@ export default function NftCard({ nft, principal, time }: NftCardProps) {
>
<div tw="flex items-center gap-3">
{!!metadata.media.length && (
<img
tw="w-full rounded-2xl max-w-[100px]"
alt="NFT preview"
src={metadata.media[0].gateway}
/>
<Tooltip
content={
<div tw="space-y-2">
<div tw="text-lg">{metadata.title}</div>
<div>{metadata.description}</div>
</div>
}
>
<img
tw="w-full rounded-2xl max-w-[100px]"
alt="NFT preview"
src={metadata.media[0].gateway}
/>
</Tooltip>
)}
<div tw="space-y-2 text-xs sm:text-sm">
{!!metadata.title && (
<Tooltip
content={
<div tw="space-y-2">
<div tw="text-lg">{metadata.title}</div>
<div>{metadata.description}</div>
</div>
}
>
<div tw="text-base sm:text-xl font-bold md:(text-ellipsis overflow-hidden w-[180px] whitespace-nowrap)">
{metadata.title}
</div>
</Tooltip>
<div tw="text-base sm:text-xl font-bold md:(text-ellipsis overflow-hidden w-[180px] whitespace-nowrap)">
{metadata.title}
</div>
)}
<div>
{!!time && <div>{time.toLocaleString()}</div>}
Expand Down