2019-09-16 12:22:30 +02:00
|
|
|
import * as React from 'react';
|
|
|
|
|
|
|
|
|
|
interface Props {
|
2019-09-20 18:43:24 +02:00
|
|
|
children: any;
|
2019-09-26 11:00:32 +02:00
|
|
|
onClick(e: React.FormEvent): void;
|
2019-09-16 12:22:30 +02:00
|
|
|
className?: string;
|
|
|
|
|
outline?: boolean;
|
2022-05-01 18:00:38 +02:00
|
|
|
disabled?: boolean;
|
2019-09-16 12:22:30 +02:00
|
|
|
}
|
|
|
|
|
|
2022-05-01 18:00:38 +02:00
|
|
|
const Button = ({ children, onClick, className = '', outline = false, disabled = false}: Props) => (
|
2019-09-16 12:22:30 +02:00
|
|
|
<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}
|
2019-09-16 12:22:30 +02:00
|
|
|
>
|
|
|
|
|
{children}
|
|
|
|
|
</button>
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
export default Button;
|