import React, { Component } from 'react'; import './index.less'; import Icon from '../Icon'; export class SpecialRadio extends Component { render() { const { checked, children, onClick, theme = '' } = this.props; return (
onClick && onClick()}> {children}
); } } export class SpecialRadioGroup extends Component { onClickItem(value) { const { onChange } = this.props; if (onChange) onChange(value); } render() { const { list = [], value, values = [], theme } = this.props; return (
{list.map(item => { return ( = 0} onClick={() => this.onClickItem(item.value)} > {item.label} ); })}
); } } export default class Radio extends Component { render() { const { checked, children, onClick } = this.props; return (
onClick && onClick()}> {children}
); } } export class RadioGroup extends Component { onClickItem(key) { const { onChange } = this.props; if (onChange) onChange(key); } render() { const { list = [], value } = this.props; return (
{list.map(item => { return ( this.onClickItem(item.key)}> {item.label} ); })}
); } }