button.tsx 376 B

123456789101112131415161718192021
  1. "use client";
  2. import { ReactNode } from "react";
  3. interface ButtonProps {
  4. children: ReactNode;
  5. className?: string;
  6. appName: string;
  7. }
  8. export const Button = ({ children, className, appName }: ButtonProps) => {
  9. return (
  10. <button
  11. className={className}
  12. onClick={() => alert(`Hello from your ${appName} app!`)}
  13. >
  14. {children}
  15. </button>
  16. );
  17. };