Skip to content

Commit ffac070

Browse files
committed
Fix for CI
1 parent f79a615 commit ffac070

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

examples/place/app.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,11 @@ class App extends Component {
4646
The 'place' prop <Origin className="target auto-string" place="left,bottom">can</Origin> be also passed as a comma separated string.
4747
</p>
4848

49-
<div ref="restricted" style={{ width: '388px', height: '160px', backgroundColor: 'lightgray', padding: '16px', position: 'relative' }}>
49+
<div ref="restricted" style={{ width: '420px', height: '160px', backgroundColor: 'lightgray', padding: '16px', position: 'relative' }}>
5050
In default, <Origin name="restricted" className="target auto-top" place="top">redux-tooltip</Origin> supposes you want to do auto-placement within the browser window.<br /><br />
51-
Using <code>within</code> prop, you can specify <Origin name="restricted" className="target auto-right" place="right">DOM element</Origin> instead of BODY element.
51+
<div style={{ position: 'absolute', right: '16px' }}>
52+
<Origin name="restricted" className="target auto-right" place="right">right edge --&gt;</Origin>
53+
</div>
5254
<div style={{ position: 'absolute', bottom: '16px' }}>
5355
<Origin name="restricted" className="target auto-bottom" place="bottom">This</Origin> is a bottom origin.
5456
</div>
@@ -58,15 +60,15 @@ class App extends Component {
5860
This is a <b>restricted</b> tooltip.
5961
</Tooltip>
6062

61-
<div ref="more" style={{ width: '388px', backgroundColor: 'lightgray', marginTop: '14px', padding: '16px' }}>
63+
<div ref="more" style={{ width: '420px', backgroundColor: 'lightgray', marginTop: '14px', padding: '16px' }}>
6264
Two or <Origin name="more" className="target auto-more" place={['left', 'top', 'bottom', 'right']}>more fallbacks</Origin> also works well.
6365
</div>
6466

6567
<Tooltip name="more" within={() => this.refs.more}>
6668
This is a <b>more</b> tooltip.
6769
</Tooltip>
6870

69-
<div ref="disabled" style={{ width: '388px', backgroundColor: 'lightgray', marginTop: '14px', padding: '16px' }}>
71+
<div ref="disabled" style={{ width: '420px', backgroundColor: 'lightgray', marginTop: '14px', padding: '16px' }}>
7072
The <Origin name="disabled" className="target auto-disabled" place="left">auto placement</Origin> feature can be disabled by passing <b>false</b> to <code>auto</code> prop.
7173
</div>
7274

tests/feature/place.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ describe('Place Example', () => {
189189

190190
const rightTipPos = position(tooltip);
191191
const rightOriPos = position(right);
192-
assert(rightTipPos.bottom < rightOriPos.top, 'tooltip should be located top of the origin');
192+
assert(rightTipPos.right < rightOriPos.left, 'tooltip should be located left of the origin');
193193

194194
// Mouseover to bottom
195195
const bottom = firstComponent(tree, Origin.WrappedComponent, { className: 'target auto-bottom' }).refs.wrapper;

0 commit comments

Comments
 (0)