2017-04-17 17:14:17 +03:00
|
|
|
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
2015-12-07 04:14:10 +03:00
|
|
|
|
2016-05-30 07:59:44 +03:00
|
|
|
const factory = (ripple) => {
|
2017-01-26 20:05:32 +03:00
|
|
|
const Thumb = ({ onMouseDown, theme, ...other }) => (
|
|
|
|
<span className={theme.thumb} onMouseDown={onMouseDown} {...other} />
|
2016-05-30 07:59:44 +03:00
|
|
|
);
|
2015-12-07 04:14:10 +03:00
|
|
|
|
2016-05-30 07:59:44 +03:00
|
|
|
Thumb.propTypes = {
|
2017-01-26 20:05:32 +03:00
|
|
|
children: PropTypes.node,
|
|
|
|
onMouseDown: PropTypes.func,
|
2016-05-30 07:59:44 +03:00
|
|
|
theme: PropTypes.shape({
|
|
|
|
ripple: PropTypes.string,
|
2017-01-26 20:05:32 +03:00
|
|
|
thumb: PropTypes.string,
|
|
|
|
}),
|
2016-05-30 07:59:44 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
return ripple(Thumb);
|
2016-04-09 21:34:34 +03:00
|
|
|
};
|
|
|
|
|
2016-05-30 07:59:44 +03:00
|
|
|
export default factory;
|