mercredi 2 septembre 2020

checkbox customized to look like a button

I am trying to create 'checkbox' which look like a button to be able to do this:

enter image description here

I am trying to customized a checkbox input type to do it, but I am not able to.

const CheckBox = 
      <div className="checkbox-style">
        <input className="checkbox-style" onChange={this.toggleCheck} id={this.id} type="checkbox" checked={this.state.isChecked} />
        <label htmlFor={this.id}>test</label>
      </div>

Which look like this:

enter image description here

even when I am applying the css below

.checkbox-style {
  border-width: 2px;
  border-color: #ff7255;
}

I can't fnd any suitable information on Internet to build this




Aucun commentaire:

Enregistrer un commentaire