Think of a Library where you go and take a book, but instead or returning it, you can keep it, modify it and share it with others, and soon you'll add your own books to the library
Think of a Library where you go and take a book, but instead or returning it, you can keep it, modify it and share it with others, and soon you'll add your own books to the library
import React from 'react';
interface ButtonProps {
text: string;
disabled?: boolean;
classNames?: string;
click?: () => void;
buttonType: 'submit' | 'reset' | 'button';
}
export default function Button({
text, disabled, classNames, click, buttonType,
}:ButtonProps) {
return (
<button
type={buttonType}
className={`${classNames} ${disabled ? 'btn-disabled' : ''} btn-default`}
onClick={disabled ? undefined : click}
>
{text}
</button>
);
}