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.
[changed] tooltips and popovers required id's for a11y
- Loading branch information
Showing
11 changed files
with
124 additions
and
27 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
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 |
---|---|---|
@@ -1,13 +1,33 @@ | ||
const positionerInstance = ( | ||
<ButtonToolbar> | ||
<OverlayTrigger | ||
container={mountNode} containerPadding={20} | ||
trigger='click' placement='bottom' | ||
overlay={<Popover title='Popover bottom'><strong>Holy guacamole!</strong> Check this info.</Popover>} | ||
> | ||
<Button bsStyle='default'>Holy guacamole!</Button> | ||
</OverlayTrigger> | ||
</ButtonToolbar> | ||
); | ||
class Example extends React.Component { | ||
constructor(props, context){ | ||
super(props, context); | ||
this.state = { show: false }; | ||
} | ||
render(){ | ||
|
||
React.render(positionerInstance, mountNode); | ||
return ( | ||
<ButtonToolbar> | ||
<Button | ||
bsStyle='default' | ||
onClick={e => this.setState({ target: e.target, show: !this.state.show })} | ||
> | ||
Holy guacamole! | ||
</Button> | ||
|
||
<Overlay | ||
show={this.state.show} | ||
target={()=> React.findDOMNode(this.state.target)} | ||
placement='bottom' | ||
container={mountNode} | ||
containerPadding={20} | ||
> | ||
<Popover title='Popover bottom'> | ||
<strong>Holy guacamole!</strong> Check this info. | ||
</Popover> | ||
</Overlay> | ||
</ButtonToolbar> | ||
); | ||
} | ||
} | ||
|
||
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
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
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