react-toolbox/components/switch/Thumb.js

18 lines
446 B
JavaScript
Raw Normal View History

2016-04-09 21:34:34 +03:00
import React, { PropTypes } from 'react';
2015-12-07 04:34:12 +03:00
import Ripple from '../ripple';
2015-12-07 04:14:10 +03:00
2016-05-25 01:54:56 +03:00
const Thumb = ({onMouseDown, theme, ...other}) => (
<span role='thumb' className={theme.thumb} onMouseDown={onMouseDown} {...other} />
2015-12-07 04:14:10 +03:00
);
2016-04-09 21:34:34 +03:00
Thumb.propTypes = {
2016-05-25 01:54:56 +03:00
children: PropTypes.any,
theme: PropTypes.shape({
ripple: PropTypes.string,
thumb: PropTypes.string
})
2016-04-09 21:34:34 +03:00
};
2016-05-25 01:54:56 +03:00
export default Ripple({spread: 2.6, centered: true})(Thumb);
2016-01-22 16:12:53 +03:00
export {Thumb as RawThumb};