diff --git a/ui_framework/doc_site/src/views/popover/popover_anchor_position.js b/ui_framework/doc_site/src/views/popover/popover_anchor_position.js
index 5a49e3eb99cf..12e0617c1ac0 100644
--- a/ui_framework/doc_site/src/views/popover/popover_anchor_position.js
+++ b/ui_framework/doc_site/src/views/popover/popover_anchor_position.js
@@ -12,19 +12,32 @@ export default class extends Component {
super(props);
this.state = {
- isPopoverOpen: false,
+ isPopoverOpen1: false,
+ isPopoverOpen2: false,
};
}
- onButtonClick() {
+ onButtonClick1() {
this.setState({
- isPopoverOpen: !this.state.isPopoverOpen,
+ isPopoverOpen1: !this.state.isPopoverOpen1,
});
}
- closePopover() {
+ closePopover1() {
this.setState({
- isPopoverOpen: false,
+ isPopoverOpen1: false,
+ });
+ }
+
+ onButtonClick2() {
+ this.setState({
+ isPopoverOpen2: !this.state.isPopoverOpen2,
+ });
+ }
+
+ closePopover2() {
+ this.setState({
+ isPopoverOpen2: false,
});
}
@@ -33,13 +46,13 @@ export default class extends Component {
+
Popover anchored to the right.
)}
- isOpen={ this.state.isPopoverOpen }
+ isOpen={this.state.isPopoverOpen1}
+ closePopover={this.closePopover1.bind(this)}
anchorPosition="right"
- closePopover={ () => {} }
>
Popover content
@@ -47,14 +60,14 @@ export default class extends Component {
- Popover anchored to the left.
+ button={(
+
+ Popover anchored to the right.
- ) }
- isOpen={ this.state.isPopoverOpen }
+ )}
+ isOpen={this.state.isPopoverOpen2}
+ closePopover={this.closePopover2.bind(this)}
anchorPosition="left"
- closePopover={ () => {} }
>
Popover content
diff --git a/ui_framework/doc_site/src/views/popover/popover_body_class_name.js b/ui_framework/doc_site/src/views/popover/popover_body_class_name.js
index f23776b69683..c5e88f5ac2fc 100644
--- a/ui_framework/doc_site/src/views/popover/popover_body_class_name.js
+++ b/ui_framework/doc_site/src/views/popover/popover_body_class_name.js
@@ -37,8 +37,8 @@ export default class extends Component {
) }
isOpen={ this.state.isPopoverOpen }
+ closePopover={ this.closePopover.bind(this) }
bodyClassName="yourClassNameHere"
- closePopover={ () => {} }
>
It's hard to tell but there's a custom class on this element