|
|
|
@ -1,11 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
interface Props {
|
|
|
|
interface Props {
|
|
|
|
children: string;
|
|
|
|
children: string;
|
|
|
|
color: string;
|
|
|
|
color?: 'primary' | 'secondary' | 'success';
|
|
|
|
onClick: () => void;
|
|
|
|
onClick: () => void;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export const Button = ({ children, color, onClick }: Props) => {
|
|
|
|
export const Button = ({ children, color='primary', onClick }: Props) => {
|
|
|
|
//const buttonType = "btn " + "btn"+"-"+{type};
|
|
|
|
//const buttonType = "btn " + "btn"+"-"+{type};
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<button type="button" className={'btn btn-'+color} onClick={onClick}>{children}</button>
|
|
|
|
<button type="button" className={'btn btn-'+color} onClick={onClick}>{children}</button>
|
|
|
|
|