diff --git a/app/components/icons.tsx b/app/components/icons.tsx index c3bbee6..2a607fd 100644 --- a/app/components/icons.tsx +++ b/app/components/icons.tsx @@ -134,3 +134,21 @@ export const BackNav = (props: SVGProps) => { ); }; + +export const Share = (props: SVGProps) => { + return ( + + + + ); +}; diff --git a/app/components/ui/shareButton.tsx b/app/components/ui/shareButton.tsx new file mode 100644 index 0000000..945d71d --- /dev/null +++ b/app/components/ui/shareButton.tsx @@ -0,0 +1,36 @@ +import { type ButtonHTMLAttributes, forwardRef } from "react"; +import { Button } from "./button"; +import { Share } from "../icons"; + +export interface ShareButtonProps + extends ButtonHTMLAttributes { + url: string; + size?: string; + variant?: "default" | "outline" | "input"; +} + +export const ShareButton = forwardRef( + ({ url, size, variant, ...props }, ref) => { + return ( + + ); + } +); +ShareButton.displayName = "ShareButton"; diff --git a/app/routes/shareRequest.tsx b/app/routes/shareRequest.tsx index 59eb640..6f82def 100644 --- a/app/routes/shareRequest.tsx +++ b/app/routes/shareRequest.tsx @@ -7,6 +7,7 @@ import { BackNav } from "~/components/icons"; import { Button } from "~/components/ui/button"; import { CopyButton } from "~/components/ui/copyButton"; import { Field } from "~/components/ui/form/form"; +import { ShareButton } from "~/components/ui/shareButton"; import { destroySession, getSession } from "~/session"; import { formatAmount, formatDate } from "~/utils/helpers"; @@ -89,23 +90,16 @@ export default function ShareRequest() { value={data.paymentUrl} variant="input" > + } > -