forked from react-bootstrap/react-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[changed] Deprecate OverlayTrigger positioning api and "manual" trigger
Positioning logic abstracted out and deprecated.
- Loading branch information
Showing
5 changed files
with
238 additions
and
311 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
|
||
const Example = React.createClass({ | ||
render(){ | ||
const style = { | ||
position: 'absolute', | ||
backgroundColor: '#EEE', | ||
border: '1px solid #CCC', | ||
borderRadius: 3, | ||
marginLeft: 5, | ||
padding: 10 | ||
}; | ||
|
||
const overlay = ( | ||
<div style={style}> | ||
<strong>Holy guacamole!</strong> Check this info. | ||
</div> | ||
); | ||
|
||
return ( | ||
<div style={{ height: 100, position: 'relative' }}> | ||
<OverlayTrigger | ||
defaultOverlayShown={true} | ||
placement="right" | ||
trigger='click' | ||
overlay={overlay} | ||
container={this} | ||
> | ||
<Button>I am an Overlay target (click me)</Button> | ||
</OverlayTrigger> | ||
</div> | ||
); | ||
} | ||
}); | ||
|
||
React.render(<Example/>, mountNode); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.