mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 19:27:52 +01:00
20 lines
432 B
TypeScript
20 lines
432 B
TypeScript
import * as React from 'react';
|
|
import { FormEvent } from 'react';
|
|
|
|
interface Props {
|
|
children: string;
|
|
onClick(e: FormEvent): void;
|
|
className?: string;
|
|
outline?: boolean;
|
|
}
|
|
|
|
const Button = ({ children, onClick, className = '', outline = false}: Props) => (
|
|
<button
|
|
onClick={onClick}
|
|
className={`${className} btn btn-${outline ? 'outline-' : ''}dark my-2`}
|
|
>
|
|
{children}
|
|
</button>
|
|
);
|
|
|
|
export default Button; |