Files
astuto/app/javascript/components/common/Button.tsx

21 lines
456 B
TypeScript
Raw Normal View History

import * as React from 'react';
interface Props {
2019-09-20 18:43:24 +02:00
children: any;
onClick(e: React.FormEvent): void;
className?: string;
outline?: boolean;
2022-05-01 18:00:38 +02:00
disabled?: boolean;
}
2022-05-01 18:00:38 +02:00
const Button = ({ children, onClick, className = '', outline = false, disabled = false}: Props) => (
<button
onClick={onClick}
2024-01-23 18:50:42 +01:00
className={`${className} btn${outline ? 'Outline' : ''}Primary`}
2022-05-01 18:00:38 +02:00
disabled={disabled}
>
{children}
</button>
);
export default Button;