lift className from Button[disabled] in Tooltip, fix #5270

This commit is contained in:
afc163 2017-03-14 11:43:49 +08:00
parent 7bc2b1dbff
commit 06b17fd553

View File

@ -117,8 +117,15 @@ export default class Tooltip extends React.Component<TooltipProps, any> {
...omited,
pointerEvents: 'none',
};
const child = cloneElement(element, { style: buttonStyle });
return <span style={spanStyle}>{child}</span>;
const child = cloneElement(element, {
style: buttonStyle,
className: null,
});
return (
<span style={spanStyle} className={element.props.className}>
{child}
</span>
);
}
return element;
}