mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 11:47:56 +01:00
Refactor CSS pt. 3 (semantically @extend Bootstrap)
This commit is contained in:
20
app/javascript/components/shared/Button.tsx
Normal file
20
app/javascript/components/shared/Button.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user