Skip to content

Commit 558155a

Browse files
committed
Update list-form.tsx
1 parent f358fe7 commit 558155a

File tree

3 files changed

+16
-3
lines changed
  • apps/dashboard/src

3 files changed

+16
-3
lines changed

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/list-form.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Alert, AlertTitle } from "@/components/ui/alert";
22
import { Button } from "@/components/ui/button";
33
import { Card } from "@/components/ui/card";
4+
import { cn } from "@/lib/utils";
45
import { useDashboardOwnedNFTs } from "@3rdweb-sdk/react/hooks/useDashboardOwnedNFTs";
56
import { useWalletNFTs } from "@3rdweb-sdk/react/hooks/useWalletNFTs";
67
import {
@@ -540,7 +541,7 @@ export const CreateListingsForm: React.FC<CreateListingsFormProps> = ({
540541
>
541542
<div
542543
className={cn(
543-
"rounded-lg overflow-hidden cursor-pointer",
544+
"cursor-pointer overflow-hidden rounded-lg",
544545
isSelected(nft) &&
545546
"outline outline-3 outline-purple-500",
546547
)}
@@ -549,6 +550,17 @@ export const CreateListingsForm: React.FC<CreateListingsFormProps> = ({
549550
? form.setValue("selected", undefined)
550551
: form.setValue("selected", nft)
551552
}
553+
onKeyDown={(e) => {
554+
if (e.key === "Enter" || e.key === " ") {
555+
e.preventDefault();
556+
isSelected(nft)
557+
? form.setValue("selected", undefined)
558+
: form.setValue("selected", nft);
559+
}
560+
}}
561+
tabIndex={0}
562+
role="button"
563+
aria-pressed={isSelected(nft)}
552564
>
553565
<NFTMediaWithEmptyState
554566
metadata={nft.metadata}

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/Inputs/ClaimPriceInput.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { cn } from "@/lib/utils";
12
import { Flex } from "@chakra-ui/react";
23
import { CurrencySelector } from "components/shared/CurrencySelector";
34
import { NATIVE_TOKEN_ADDRESS } from "thirdweb";
@@ -36,7 +37,7 @@ export const ClaimPriceInput = (props: {
3637
}
3738
>
3839
<Flex gap={2} flexDir={{ base: "column", md: "row" }}>
39-
<div className="min-w-[70px] w-full md:w-1/2">
40+
<div className="w-full min-w-[70px] md:w-1/2">
4041
<PriceInput
4142
w="full"
4243
value={field.price?.toString() || ""}

apps/dashboard/src/tw-components/card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const Card: React.FC<CardProps> = ({
2626
style={{ padding: outlineBorder.width }}
2727
>
2828
<div
29-
className="absolute inset-0 -z-10"
29+
className="-z-10 absolute inset-0"
3030
style={{ background: outlineBorder.gradient }}
3131
/>
3232
<div className={baseClasses} {...props}>

0 commit comments

Comments
 (0)