“So erstellen Sie Taste in React JS” Code-Antworten

So erstellen Sie eine Taste mit React

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
Anthony Smith

So erstellen Sie Taste in React JS

<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;
}
Cruel Cassowary

Ähnliche Antworten wie “So erstellen Sie Taste in React JS”

Fragen ähnlich wie “So erstellen Sie Taste in React JS”

Weitere verwandte Antworten zu “So erstellen Sie Taste in React JS” auf JavaScript

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen