diff --git a/components/Button.tsx b/components/Button.tsx new file mode 100644 index 00000000..e17d3e43 --- /dev/null +++ b/components/Button.tsx @@ -0,0 +1,22 @@ +import React from "react"; + +type Props = { + children: string; + className?: string; + onClick: () => void; +}; + +const Button = React.forwardRef( + ({ children, className = "", onClick }, ref) => ( + + ) +); + +Button.displayName = "Button"; +export default Button; diff --git a/components/Wallet.tsx b/components/Wallet.tsx index ce65dfd7..c702a050 100644 --- a/components/Wallet.tsx +++ b/components/Wallet.tsx @@ -3,11 +3,11 @@ import { Popover } from "@headlessui/react"; import { toast } from "react-toastify"; import Image from "next/image"; -import { formatWalletAddress } from "utils/formatters"; - +import Button from "./Button"; import ConnectModal from "./ConnectModal"; import useWalletStore from "stores/useWalletStore"; import useInjectiveBalance from "hooks/useInjectiveBalance"; +import { formatWalletAddress } from "utils/formatters"; const WalletPopover = ({ children }: { children: React.ReactNode }) => { const address = useWalletStore((state) => state.address); @@ -17,7 +17,7 @@ const WalletPopover = ({ children }: { children: React.ReactNode }) => { return ( - + {children} @@ -33,12 +33,12 @@ const WalletPopover = ({ children }: { children: React.ReactNode }) => {

- +

{address}

+ )}