mancala/src/components/Button.tsx

27 lines
491 B
TypeScript
Raw Normal View History

2022-06-04 14:49:34 +03:00
import * as React from "react";
import { FunctionComponent } from "react";
2021-07-02 23:13:38 +03:00
2022-06-04 14:49:34 +03:00
const Button: FunctionComponent<{
text: String;
onClick: () => void;
color: string;
}> = ({ text, color, onClick }) => {
return (
<button
onClick={onClick}
style={{
background: color,
color: "white",
margin: "5px",
padding: "10px",
border: "none",
borderRadius: "4vw",
}}
>
{text}
</button>
);
};
2021-07-02 23:13:38 +03:00
2022-06-04 14:49:34 +03:00
export default Button;