2015-06-10 17:59:32 +08:00
|
|
|
'use strict';
|
|
|
|
|
2015-06-03 17:08:43 +08:00
|
|
|
var React = require('react');
|
|
|
|
var Tooltip = require('rc-tooltip');
|
|
|
|
|
|
|
|
module.exports = React.createClass({
|
|
|
|
getDefaultProps: function () {
|
|
|
|
return {
|
|
|
|
placement: 'top'
|
|
|
|
};
|
|
|
|
},
|
|
|
|
render: function() {
|
2015-06-10 17:59:32 +08:00
|
|
|
return (
|
2015-06-09 17:44:22 +08:00
|
|
|
<Tooltip placement={this.props.placement}
|
2015-06-09 16:40:16 +08:00
|
|
|
prefixCls="ant-tooltip"
|
2015-06-10 22:11:58 +08:00
|
|
|
trigger={this.props.trigger}
|
2015-06-09 17:44:22 +08:00
|
|
|
overlay={this.props.title}>
|
2015-06-03 17:08:43 +08:00
|
|
|
{this.props.children}
|
|
|
|
</Tooltip>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
});
|