forked from react-toolbox/react-toolbox
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCheck.js
More file actions
28 lines (24 loc) · 629 Bytes
/
Check.js
File metadata and controls
28 lines (24 loc) · 629 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import React, { PropTypes } from 'react';
import classnames from 'classnames';
const factory = (ripple) => {
const Check = ({checked, children, onMouseDown, theme}) => (
<div
data-react-toolbox='check'
className={classnames(theme.check, { [theme.checked]: checked })}
onMouseDown={onMouseDown}
>
{children}
</div>
);
Check.propTypes = {
checked: PropTypes.bool,
children: PropTypes.any,
onMouseDown: PropTypes.func,
theme: PropTypes.shape({
check: PropTypes.string,
checked: PropTypes.string
})
};
return ripple(Check);
};
export default factory;