UNPKG

react-jam-ui

Version:

React JAM UI components

25 lines (22 loc) 882 B
import React from 'react'; import classNames from 'classnames'; import './styles.styl' export default class Radio extends React.Component { constructor() { super(); } render() { let classes = classNames('radio', this.props.className, { 'disabled': this.props.disabled, 'error': this.props.error, 'valid': this.props.valid }); //const { layout, ...rest } = props return ( <div className={ classes }> <input type='radio' disabled={this.props.disabled} defaultChecked={this.props.defaultChecked} value={this.props.value} name={this.props.name} onClick={this.props.onClick} checked={this.props.checked} readOnly={this.props.readOnly} id={this.props.id} /> <label htmlFor={this.props.id}>{this.props.label}</label> </div> ) } }