Sha256: 8f3fc07699c6c163aa256b8522bb59753e0ebb3e6c15b39075efc7ab4e0e3630

Contents?: true

Size: 815 Bytes

Versions: 41

Compression:

Stored size: 815 Bytes

Contents

const InputRadio = ({ label, name, value, checked, inline, isLast, onChange, disabled = false }) => {

  const id = `${name}[${value}]`;

  const wrapperClassName = classNames({
    'next-input-wrapper': true,
    'inline': inline,
    'sr': !isLast
  });

  const labelClassName = classNames({
    'next-label': true,
    'next-label--switch': true,
    'inline': inline,
    'fw-normal': inline
  });

  const handleChange = (e) => {
    onChange && onChange(e.target.value);
  };

  return(
    <div className={wrapperClassName}>
      <label htmlFor={id} className={labelClassName}>{label}</label>
      <input id={id} className="next-radio" type="radio" value={value} name={name} checked={checked} onChange={handleChange} disabled={disabled} />
      <span className="next-radio--styled" />
    </div>
  )

};

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
disco_app-0.16.1.pre.sidekiq.pre.6.pre.release app/assets/javascripts/disco_app/components/ui-kit/forms/input-radio.es6.jsx
disco_app-0.10.0 app/assets/javascripts/disco_app/components/ui-kit/forms/input-radio.es6.jsx
disco_app-0.10.1 app/assets/javascripts/disco_app/components/ui-kit/forms/input-radio.es6.jsx
disco_app-0.10.2 app/assets/javascripts/disco_app/components/ui-kit/forms/input-radio.es6.jsx
disco_app-0.10.3 app/assets/javascripts/disco_app/components/ui-kit/forms/input-radio.es6.jsx
disco_app-0.10.4 app/assets/javascripts/disco_app/components/ui-kit/forms/input-radio.es6.jsx
disco_app-0.10.5 app/assets/javascripts/disco_app/components/ui-kit/forms/input-radio.es6.jsx
disco_app-0.11.0 app/assets/javascripts/disco_app/components/ui-kit/forms/input-radio.es6.jsx
disco_app-0.11.1 app/assets/javascripts/disco_app/components/ui-kit/forms/input-radio.es6.jsx
disco_app-0.12.0 app/assets/javascripts/disco_app/components/ui-kit/forms/input-radio.es6.jsx
disco_app-0.12.1 app/assets/javascripts/disco_app/components/ui-kit/forms/input-radio.es6.jsx
disco_app-0.12.5 app/assets/javascripts/disco_app/components/ui-kit/forms/input-radio.es6.jsx
disco_app-0.12.6 app/assets/javascripts/disco_app/components/ui-kit/forms/input-radio.es6.jsx
disco_app-0.12.7 app/assets/javascripts/disco_app/components/ui-kit/forms/input-radio.es6.jsx
disco_app-0.13.0 app/assets/javascripts/disco_app/components/ui-kit/forms/input-radio.es6.jsx
disco_app-0.13.1 app/assets/javascripts/disco_app/components/ui-kit/forms/input-radio.es6.jsx
disco_app-0.13.2 app/assets/javascripts/disco_app/components/ui-kit/forms/input-radio.es6.jsx
disco_app-0.13.3 app/assets/javascripts/disco_app/components/ui-kit/forms/input-radio.es6.jsx
disco_app-0.13.4 app/assets/javascripts/disco_app/components/ui-kit/forms/input-radio.es6.jsx
disco_app-0.13.5 app/assets/javascripts/disco_app/components/ui-kit/forms/input-radio.es6.jsx