Skip to content

Commit

Permalink
Merge b70dfa4 into 2c54421
Browse files Browse the repository at this point in the history
  • Loading branch information
ex90rts committed Jan 9, 2019
2 parents 2c54421 + b70dfa4 commit a21bf5e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
4 changes: 4 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
History
=======

0.4.10

* `CHANGED` style change: move bg color form inner to content

0.4.9
---

Expand Down
7 changes: 4 additions & 3 deletions demo/TooltipDemo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Button from 'uxcore-button';
export default class Demo extends React.Component {
render() {
const overlay = <div style={{}}>提示文字</div>;
const longOverlay = <div style={{}}>特别特别长的提示文字特别特别长的提示文字特别特别长的提示文字特别特别长的提示文字</div>;
return (
<div className="demo">
<div>
Expand All @@ -17,13 +18,13 @@ export default class Demo extends React.Component {
<h3>讲解:鼠标点击出现提示</h3>
<div className="container">
<div className="top">
<Tooltip overlay={overlay} placement="topLeft" trigger={['click']}>
<Tooltip overlayClassName="kuma-tooltip-dark" overlay={overlay} placement="topLeft" trigger={['click']}>
<Button size="small" type="outline">上左</Button>
</Tooltip>
<Tooltip overlay={overlay} placement="top" trigger={['click']}>
<Tooltip overlayClassName="kuma-tooltip-dark" overlay={longOverlay} placement="top" trigger={['click']}>
<Button style={{ marginLeft: 10 }} size="small" type="outline"></Button>
</Tooltip>
<Tooltip overlay={overlay} placement="topRight" trigger={['click']}>
<Tooltip overlay={longOverlay} placement="topRight" trigger={['click']} overlayStyle={{ maxWidth: 200 }}>
<Button style={{ marginLeft: 10 }} size="small" type="outline">上右</Button>
</Tooltip>
</div>
Expand Down
2 changes: 2 additions & 0 deletions src/Tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import RcTooltip from 'rc-tooltip';

export default class Tooltip extends RcTooltip {
static displayName = 'uxcore-tooltip'

static propTypes = {
...RcTooltip.propTypes,
}

static defaultProps = {
...RcTooltip.defaultProps,
prefixCls: 'kuma-tooltip',
Expand Down
5 changes: 3 additions & 2 deletions src/Tooltip.less
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@
box-shadow: @box-shadow-1;
border-radius: @global-border-radius;
border: 1px solid @normal-alpha-6;
background-color: #fff;
// max-width: 320px;
}
&-inner {
position: relative;
Expand All @@ -169,16 +171,15 @@
text-align: center;
color: @normal-alpha-2;
text-decoration: none;
background-color: #fff;
}
}

.@{__tooltipPrefixCls}-dark {
.@{__tooltipPrefixCls}-content {
border-color: @__tooltipDarkColorNoAlpha;
background: @__tooltipDarkColorNoAlpha;
}
.@{__tooltipPrefixCls}-inner {
background: @__tooltipDarkColorNoAlpha;
color: white;
}
&.@{__tooltipPrefixCls}-placement-left,
Expand Down

0 comments on commit a21bf5e

Please sign in to comment.