1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
import React from 'react'; import { Button as MaterialButton } from '@material-ui/core'; interface PropTypes { color: 'primary' | 'secondary'; } const Button: React.FC<PropTypes> = ({ color, children }) => ( <MaterialButton variant="contained" color={color} children={children} /> ); export default Button;