UNPKG

@ftrack/react-toolbox

Version:

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

32 lines (27 loc) 706 B
import PropTypes from 'prop-types'; import React from 'react'; import classnames from 'classnames'; const factory = (ripple) => { const Check = ({checked, children, onMouseDown, theme, style}) => ( <div data-react-toolbox='check' className={classnames(theme.check, { [theme.checked]: checked })} onMouseDown={onMouseDown} style={style} > {children} </div> ); Check.propTypes = { checked: PropTypes.bool, children: PropTypes.any, onMouseDown: PropTypes.func, style: PropTypes.object, theme: PropTypes.shape({ check: PropTypes.string, checked: PropTypes.string }) }; return ripple(Check); }; export default factory;