Files
aliasvault/browser-extensions/chrome/src/components/Button.tsx
2025-02-01 11:08:58 +01:00

24 lines
503 B
TypeScript

import React from 'react';
type ButtonProps = {
onClick: () => void;
children: React.ReactNode;
type?: 'button' | 'submit' | 'reset';
};
/**
* Button component
*/
const Button: React.FC<ButtonProps> = ({ onClick, children, type = 'button' }) => {
return (
<button
className="bg-primary-500 hover:bg-primary-600 text-white font-medium rounded-lg px-4 py-2 text-sm w-full"
onClick={onClick}
type={type}
>
{children}
</button>
);
};
export default Button;