Hey is a decentralized and permissionless social media app built with Lens Protocol 馃尶
1import { Button } from "@/components/Shared/UI";
2import {
3 type FundingToken,
4 useFundModalStore
5} from "@/store/non-persisted/modal/useFundModalStore";
6
7interface TopUpButtonProps {
8 size?: "sm" | "md";
9 outline?: boolean;
10 className?: string;
11 token?: FundingToken;
12 label?: string;
13 amountToTopUp?: number;
14}
15
16const TopUpButton = ({
17 size = "md",
18 outline = false,
19 className = "",
20 token,
21 label = "Top-up your account",
22 amountToTopUp
23}: TopUpButtonProps) => {
24 const { setShowFundModal } = useFundModalStore();
25
26 return (
27 <Button
28 aria-label={label}
29 className={className}
30 onClick={() =>
31 setShowFundModal({ amountToTopUp, showFundModal: true, token })
32 }
33 outline={outline}
34 size={size}
35 type="button"
36 >
37 {label}
38 </Button>
39 );
40};
41
42export default TopUpButton;