mancala/src/components/Button.tsx
2021-07-04 01:35:08 +03:00

22 lines
562 B
TypeScript

import * as React from 'react';
import { FunctionComponent } from "react"
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: "3vw",
}} >
{text}
</button>
)
}
export default Button