index.jsx 415 字节
Newer Older
A
afc163 已提交
1 2
'use strict';

A
afc163 已提交
3 4 5 6 7 8 9 10 11 12
var React = require('react');
var Tooltip = require('rc-tooltip');

module.exports = React.createClass({
  getDefaultProps: function () {
    return {
      placement: 'top'
    };
  },
  render: function() {
A
afc163 已提交
13
    return (
Y
yiminghe 已提交
14
      <Tooltip placement={this.props.placement}
A
afc163 已提交
15
        prefixCls="ant-tooltip"
Y
yiminghe 已提交
16
        overlay={this.props.title}>
A
afc163 已提交
17 18 19 20 21
        {this.props.children}
      </Tooltip>
    );
  }
});