Skip to content

Commit 13f8b52

Browse files
feat(Simulator/WalletHome/NFTList): migrate to Tailwind
1 parent 85e0fd6 commit 13f8b52

File tree

1 file changed

+13
-18
lines changed

1 file changed

+13
-18
lines changed

src/components/Simulator/WalletHome/NFTList.tsx

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import React from "react"
2-
import { Box, Flex, type FlexProps, Text } from "@chakra-ui/react"
1+
import { TwImage as Image } from "@/components/Image"
2+
import { Flex, type FlexProps } from "@/components/ui/flex"
33

4-
import { Image } from "@/components/Image"
4+
import { cn } from "@/lib/utils/cn"
55

66
import type { NFT } from "./interfaces"
77

@@ -11,26 +11,21 @@ type NFTListProps = FlexProps & {
1111
nfts: Array<NFT>
1212
}
1313
export const NFTList = ({ nfts, ...flexProps }: NFTListProps) => {
14-
const size = useBreakpointValue({ base: 20, md: 24 })
14+
const size = useBreakpointValue({
15+
base: "max-w-20 max-h-20",
16+
md: "max-w-24 max-h-24",
17+
})
1518
return (
16-
<Flex w="full" gap={4} h="full" flexWrap="wrap" {...flexProps}>
19+
<Flex className="size-full flex-wrap gap-4" {...flexProps}>
1720
{nfts.length ? (
1821
nfts.map(({ title, image }) => (
19-
<Box key={title} w="fit-content">
20-
<Image
21-
src={image}
22-
alt=""
23-
objectFit="contain"
24-
maxW={size}
25-
maxH={size}
26-
/>
27-
<Text fontSize="xs" m={0}>
28-
{title}
29-
</Text>
30-
</Box>
22+
<div key={title} className="w-fit">
23+
<Image src={image} alt="" className={cn("object-contain", size)} />
24+
<p className="text-xs">{title}</p>
25+
</div>
3126
))
3227
) : (
33-
<Text>No NFTs yet!</Text>
28+
<p>No NFTs yet!</p>
3429
)}
3530
</Flex>
3631
)

0 commit comments

Comments
 (0)