mancala/src/components/Button.tsx

21 lines
529 B
TypeScript
Raw Normal View History

2021-07-02 23:13:38 +03:00
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,
margin: "5px",
padding: "10px",
border : "none",
borderRadius: "3vw",
}} >
{text}
</button>
)
}
export default Button