react-toolbox/components/switch/Thumb.js

20 lines
427 B
JavaScript
Raw Normal View History

2016-04-09 21:34:34 +03:00
import React, { PropTypes } from 'react';
2015-12-07 04:14:10 +03:00
const factory = (ripple) => {
const Thumb = ({onMouseDown, theme, ...other}) => (
<span role='thumb' className={theme.thumb} onMouseDown={onMouseDown} {...other} />
);
2015-12-07 04:14:10 +03:00
Thumb.propTypes = {
children: PropTypes.any,
theme: PropTypes.shape({
ripple: PropTypes.string,
thumb: PropTypes.string
})
};
return ripple(Thumb);
2016-04-09 21:34:34 +03:00
};
export default factory;