File tree 3 files changed +16
-3
lines changed
app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]
_components/claim-conditions/claim-conditions-form/Inputs
3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 1
1
import { Alert , AlertTitle } from "@/components/ui/alert" ;
2
2
import { Button } from "@/components/ui/button" ;
3
3
import { Card } from "@/components/ui/card" ;
4
+ import { cn } from "@/lib/utils" ;
4
5
import { useDashboardOwnedNFTs } from "@3rdweb-sdk/react/hooks/useDashboardOwnedNFTs" ;
5
6
import { useWalletNFTs } from "@3rdweb-sdk/react/hooks/useWalletNFTs" ;
6
7
import {
@@ -540,7 +541,7 @@ export const CreateListingsForm: React.FC<CreateListingsFormProps> = ({
540
541
>
541
542
< div
542
543
className = { cn (
543
- "rounded-lg overflow-hidden cursor-pointer " ,
544
+ "cursor-pointer overflow-hidden rounded-lg " ,
544
545
isSelected ( nft ) &&
545
546
"outline outline-3 outline-purple-500" ,
546
547
) }
@@ -549,6 +550,17 @@ export const CreateListingsForm: React.FC<CreateListingsFormProps> = ({
549
550
? form . setValue ( "selected" , undefined )
550
551
: form . setValue ( "selected" , nft )
551
552
}
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 ) }
552
564
>
553
565
< NFTMediaWithEmptyState
554
566
metadata = { nft . metadata }
Original file line number Diff line number Diff line change
1
+ import { cn } from "@/lib/utils" ;
1
2
import { Flex } from "@chakra-ui/react" ;
2
3
import { CurrencySelector } from "components/shared/CurrencySelector" ;
3
4
import { NATIVE_TOKEN_ADDRESS } from "thirdweb" ;
@@ -36,7 +37,7 @@ export const ClaimPriceInput = (props: {
36
37
}
37
38
>
38
39
< 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" >
40
41
< PriceInput
41
42
w = "full"
42
43
value = { field . price ?. toString ( ) || "" }
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export const Card: React.FC<CardProps> = ({
26
26
style = { { padding : outlineBorder . width } }
27
27
>
28
28
< div
29
- className = "absolute inset-0 -z-10 "
29
+ className = "-z-10 absolute inset-0"
30
30
style = { { background : outlineBorder . gradient } }
31
31
/>
32
32
< div className = { baseClasses } { ...props } >
You can’t perform that action at this time.
0 commit comments