forked from react-bootstrap/react-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
239 additions
and
146 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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,45 @@ | ||
|
||
const Example = React.createClass({ | ||
getInitialState(){ | ||
return { show: true }; | ||
}, | ||
|
||
toggle(){ | ||
this.setState({ show: !this.state.show }); | ||
}, | ||
|
||
render(){ | ||
const style = { | ||
position: 'absolute', | ||
backgroundColor: '#EEE', | ||
boxShadow: '0 5px 10px rgba(0, 0, 0, 0.2)', | ||
border: '1px solid #CCC', | ||
borderRadius: 3, | ||
marginLeft: -5, | ||
marginTop: 5, | ||
padding: 10 | ||
}; | ||
|
||
return ( | ||
<div style={{ height: 100, position: 'relative' }}> | ||
<Button ref='target' onClick={this.toggle}> | ||
I am an Overlay target | ||
</Button> | ||
|
||
<Overlay | ||
show={this.state.show} | ||
onHide={() => this.setState({ show: false })} | ||
placement="right" | ||
container={this} | ||
target={ props => React.findDOMNode(this.refs.target)} | ||
> | ||
<div style={style}> | ||
<strong>Holy guacamole!</strong> Check this info. | ||
</div> | ||
</Overlay> | ||
</div> | ||
); | ||
} | ||
}); | ||
|
||
React.render(<Example/>, mountNode); |
This file was deleted.
Oops, something went wrong.
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
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
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.