diff --git a/apps/dashboard/src/components/shared/CurrencySelector.tsx b/apps/dashboard/src/components/shared/CurrencySelector.tsx index 35a1b6f9dd2..e6be75df4c6 100644 --- a/apps/dashboard/src/components/shared/CurrencySelector.tsx +++ b/apps/dashboard/src/components/shared/CurrencySelector.tsx @@ -1,12 +1,23 @@ -import { Flex, Input, Select, type SelectProps } from "@chakra-ui/react"; +import { Button } from "@/components/ui/button"; +import { Input } from "@/components/ui/input"; +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "@/components/ui/select"; +import { cn } from "@/lib/utils"; import { CURRENCIES, type CurrencyMetadata } from "constants/currencies"; import { useMemo, useState } from "react"; import { NATIVE_TOKEN_ADDRESS, ZERO_ADDRESS, isAddress } from "thirdweb"; -import { Button } from "tw-components"; import { useAllChainsData } from "../../hooks/chains/allChains"; -interface CurrencySelectorProps extends SelectProps { +interface CurrencySelectorProps { value: string; + onChange?: (event: React.ChangeEvent) => void; + className?: string; + isDisabled?: boolean; small?: boolean; hideDefaultCurrencies?: boolean; showCustomCurrency?: boolean; @@ -15,7 +26,7 @@ interface CurrencySelectorProps extends SelectProps { contractChainId: number; } -export const CurrencySelector: React.FC = ({ +export function CurrencySelector({ value, onChange, small, @@ -24,8 +35,9 @@ export const CurrencySelector: React.FC = ({ isPaymentsSelector = false, defaultCurrencies = [], contractChainId: chainId, - ...props -}) => { + className, + isDisabled, +}: CurrencySelectorProps) { const { idToChain } = useAllChainsData(); const chain = chainId ? idToChain.get(chainId) : undefined; @@ -92,40 +104,41 @@ export const CurrencySelector: React.FC = ({ if (isAddingCurrency && !hideDefaultCurrencies) { return ( -
- - - setEditCustomCurrency(e.target.value)} - /> - - +
+ + setEditCustomCurrency(e.target.value)} + /> +
); } return ( - +
- +
); -}; +}