2016-04-09 21:34:34 +03:00
|
|
|
import React, { PropTypes } from 'react';
|
2015-12-07 03:40:59 +03:00
|
|
|
|
2016-05-29 23:09:02 +03:00
|
|
|
const factory = (ripple) => {
|
|
|
|
const Radio = ({checked, onMouseDown, theme, ...other}) => (
|
|
|
|
<div
|
|
|
|
data-react-toolbox='radio'
|
|
|
|
className={theme[checked ? 'radioChecked' : 'radio']}
|
|
|
|
onMouseDown={onMouseDown}
|
|
|
|
{...other}
|
|
|
|
/>
|
|
|
|
);
|
2015-12-07 03:40:59 +03:00
|
|
|
|
2016-05-29 23:09:02 +03:00
|
|
|
Radio.propTypes = {
|
|
|
|
checked: PropTypes.bool,
|
|
|
|
children: PropTypes.any,
|
|
|
|
onMouseDown: PropTypes.func,
|
|
|
|
theme: PropTypes.shape({
|
2016-06-04 00:44:33 +03:00
|
|
|
radio: PropTypes.string,
|
|
|
|
radioChecked: PropTypes.string,
|
|
|
|
ripple: PropTypes.string
|
2016-05-29 23:09:02 +03:00
|
|
|
})
|
|
|
|
};
|
|
|
|
|
|
|
|
return ripple(Radio);
|
2016-04-09 21:34:34 +03:00
|
|
|
};
|
|
|
|
|
2016-05-29 23:09:02 +03:00
|
|
|
export default factory;
|