import PropTypes from 'prop-types'
const Button = ({ color, text, onClick }) => {
return (
<button
onClick={onClick}
style={{backgroundColor: color}}
className='btn'>
{text}
</button>
)
}
Button.defaultrops = {
color: 'steelblue'
}
Button.propTypes = {
text: PropTypes.string,
color:PropTypes.string,
onClick: PropTypes.func,
}
export default Button
<div className='col '>
<button type="button" className="btn">Buy a G-Raffe Now!</button>
</div>
// css for button
.btn{
padding-left: 35px;
padding-right: 35px;
border: 2px;
font-family: zedya;
font-size: 15px;
color: black;
background-color: #fcdc1f;
font-weight: 700;
font-style: italic;
}
.btn:hover{
color: rgb(255, 255, 255);
animation: normal;
}