luqin / react-icheck

:radio_button: iCheck components built with React. Highly customizable checkbox, radio buttons and radio group.
https://luqin.github.io/react-icheck
177 stars 40 forks source link

Added className prop for outer label #8

Closed isomoar closed 7 years ago

isomoar commented 8 years ago

I think outer

luqin commented 8 years ago

@isomoar Thanks for you PR. How about outerLabelClassName => labelClassName ?

isomoar commented 8 years ago

@luqin OK, just updated to labelClassName.

luqin commented 8 years ago

@isomoar Hi. How about add className like this

// these are a default classnames used by icheck (# are replaced with classes.base)
  classes: {
    base: 'icheck', // classname to search for and customize
    div: '#-item', // classname to add for a styler div
    area: '#-area-', // classname to add to styler, when "area" option is used
    input: '#-input', // classname to add to original input
    label: '#-label' // classname to add to assigned labels
  },

from https://github.com/fronteed/icheck/tree/2.x#these-are-global-object-options

cvetanov commented 7 years ago

Hi @luqin, I encountered a problem when trying to add css rules for the span element inside the label. This pull request solves my problem by adding a class to the outer label so the css rules can be more specific, but it fails on Travis because of es-lint settings (no-trailing-spaces). Can you fix this simple problem and merge the PR?

Keep me informed and if there are some problems, I'll be happy to make a PR myself and fix this.

Thanks, Goce