mancala/src/components/Button.tsx

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