diff --git a/webapp/src/components/ui/button.tsx b/webapp/src/components/ui/button.tsx new file mode 100644 index 0000000..ed6f884 --- /dev/null +++ b/webapp/src/components/ui/button.tsx @@ -0,0 +1,27 @@ +import React from 'react'; +import { useRouter } from 'next/router'; + +interface ButtonProps { + children: string; // Only allow text + onClick?: () => void; // Optional + className?: string; // Optional, will override default style + route?: string; // Optional re-routing +} + +export function Button({ children, onClick, className = "", route }: ButtonProps) { + const router = useRouter(); + + const handleClick = () => { + if (onClick) onClick(); // Execute custom logic, if provided + if (route) router.push(route); // Navigate to the route, if specified + }; + + return ( + + ); +} \ No newline at end of file diff --git a/webapp/src/components/ui/card.tsx b/webapp/src/components/ui/card.tsx new file mode 100644 index 0000000..7cf4ecf --- /dev/null +++ b/webapp/src/components/ui/card.tsx @@ -0,0 +1,22 @@ +import React, { ReactNode } from 'react'; + +interface CardProps { + children: ReactNode; // any valid React children + className?: string; +} + +export function Card({ children, className = "" }: CardProps) { + return ( +
+ Donations for charities are inconsistent and many charities struggle with finances. + To solve this problem, we are creating Stock Charity, a charity that uses donations + to buy stocks that payout dividends and then uses those dividends to finance charities year-round. +
+We have over
+$xxx,xxx.xx
+in stocks
+which have paid out over
+$xxx,xxx.xx
+in dividends to over
+xxx charities
+