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