bokuweb / re-bulma

[Deprecated] 💎Bulma components for React
http://bokuweb.github.io/re-bulma/
MIT License
364 stars 66 forks source link

add a prop for callbacks on DOM event #55

Open Thebigbignooby opened 7 years ago

Thebigbignooby commented 7 years ago

For example on the Checkbox element.

I want to do the following :

import { Checkbox } from 're-bulma'

const CustomComponent = ({ option, onToggle }) => (
  <Checkbox
    key={ option.name }
    onCheck={ () => onToggle()}
  >{option.name}</Checkbox>
)

and have my callback be fired everytime I check or uncheck this checkbox.

but at the moment . . . nothing is happening, and I'm too lazy to implement this myself :)

bokuweb commented 7 years ago

@Thebigbignooby Thanks for your report. I'll need to add callback props. But, does react support the onCheck callback? Is it onClick?