1234567891011121314151617181920 |
- import React from 'react';
- import './index.less';
- import Button from '../Button';
- function RadioButton(props) {
- const { list, checked } = props;
- return (
- <div className="radio-button">
- {list.map(item => {
- return (
- <Button theme={item.key === checked ? 'theme' : 'default'} size="small" radius>
- {item.title}
- </Button>
- );
- })}
- </div>
- );
- }
- RadioButton.propTypes = {};
- export default RadioButton;
|