21 lines
529 B
TypeScript
21 lines
529 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,
|
||
|
|
margin: "5px",
|
||
|
|
padding: "10px",
|
||
|
|
border : "none",
|
||
|
|
borderRadius: "3vw",
|
||
|
|
}} >
|
||
|
|
{text}
|
||
|
|
</button>
|
||
|
|
)
|
||
|
|
}
|
||
|
|
|
||
|
|
export default Button
|