UNPKG

@ftrack/react-toolbox

Version:

A set of React components implementing Google's Material Design specification with the power of CSS Modules.

29 lines (24 loc) 628 B
import PropTypes from 'prop-types'; import React from 'react'; const factory = (ripple) => { const Radio = ({checked, onMouseDown, theme, ...other}) => ( <div data-react-toolbox='radio' className={theme[checked ? 'radioChecked' : 'radio']} onMouseDown={onMouseDown} {...other} /> ); Radio.propTypes = { checked: PropTypes.bool, children: PropTypes.any, onMouseDown: PropTypes.func, theme: PropTypes.shape({ radio: PropTypes.string, radioChecked: PropTypes.string, ripple: PropTypes.string }) }; return ripple(Radio); }; export default factory;