import './Bouton.css'
import {useState} from "react";

function Bouton() {

    const [status, setStatus] = useState(true)

    return(
        <div className="btn">
            <button onClick={() => setStatus((status) => !status)}>
                Chatière {writeStatus(status)}
            </button>
        </div>
    )


}

function writeStatus(status: boolean){
    if(status)
        return "ouverte"
    else
        return "fermée"
}

export default Bouton
