diff --git a/components/popover/index.jsx b/components/popover/index.jsx index 80b046f068..af003e6b82 100644 --- a/components/popover/index.jsx +++ b/components/popover/index.jsx @@ -4,14 +4,14 @@ var React = require('react'); var Tooltip = require('rc-tooltip'); module.exports = React.createClass({ - getDefaultProps: function () { + getDefaultProps() { return { transitionName: '', placement: 'top', trigger: 'hover' }; }, - render: function() { + render() { var overlay =
{this.props.title} diff --git a/components/tooltip/index.jsx b/components/tooltip/index.jsx index db06f61a3b..9eef744521 100644 --- a/components/tooltip/index.jsx +++ b/components/tooltip/index.jsx @@ -4,16 +4,23 @@ var React = require('react'); var Tooltip = require('rc-tooltip'); module.exports = React.createClass({ - getDefaultProps: function () { + getDefaultProps() { return { placement: 'top' }; }, - render: function() { + render() { + var transitionName = ({ + top: 'zoom-down', + bottom: 'zoom-up', + left: 'zoom-right', + right: 'zoom-left' + })[this.props.placement]; return ( {this.props.children}