forked from M3-Academy/desafio-react-e-typescript
feat: Cria o componente Button
This commit is contained in:
parent
1d1cce8384
commit
e55d522187
19
src/components/Button/Buttom.tsx
Normal file
19
src/components/Button/Buttom.tsx
Normal file
@ -0,0 +1,19 @@
|
||||
import React from "react";
|
||||
|
||||
interface Btn {
|
||||
text: string;
|
||||
type: "button" | "submit" | "reset";
|
||||
className: string;
|
||||
}
|
||||
|
||||
const Button = ( props: Btn ) => {
|
||||
const { text, type, className } = props;
|
||||
|
||||
return (
|
||||
<button type={type} className={className}>
|
||||
{text}
|
||||
</button>
|
||||
);
|
||||
};
|
||||
|
||||
export { Button };
|
Loading…
Reference in New Issue
Block a user