File tree Expand file tree Collapse file tree 4 files changed +10
-10
lines changed
static/usage/popover/presenting Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,13 @@ function Example() {
11
11
const [roleMsg, setRoleMsg] = useState (' ' );
12
12
13
13
return (
14
- <div >
14
+ <IonContent >
15
15
<IonButton onClick = { (e : any ) => present ({
16
16
event: e ,
17
17
onDidDismiss : (e : CustomEvent ) => setRoleMsg (` Popover dismissed with role: ${e .detail .role } ` )
18
18
})} >Click Me</IonButton >
19
19
<p >{ roleMsg } </p >
20
- </div >
20
+ </IonContent >
21
21
);
22
22
}
23
23
export default Example ;
Original file line number Diff line number Diff line change 1
1
``` html
2
2
<template >
3
- <div >
3
+ <ion-content >
4
4
<ion-button @click =" openPopover" >Click Me</ion-button >
5
5
<p >{{ roleMsg }}</p >
6
- </div >
6
+ </ion-content >
7
7
</template >
8
8
9
9
<script lang =" ts" >
10
- import { IonButton , popoverController } from ' @ionic/vue' ;
10
+ import { IonButton , IonContent , popoverController } from ' @ionic/vue' ;
11
11
import Popover from ' ./Popover.vue' ;
12
12
13
13
export default {
14
- components: { IonButton },
14
+ components: { IonButton, IonContent },
15
15
data () {
16
16
return {
17
17
roleMsg: ' '
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import React from 'react';
3
3
import { IonButton , IonContent , IonPopover } from ' @ionic/react' ;
4
4
function Example() {
5
5
return (
6
- <div >
6
+ <IonContent >
7
7
<IonButton id = " click-trigger" >Left-Click Me</IonButton >
8
8
<IonPopover trigger = " click-trigger" triggerAction = " click" >
9
9
<IonContent class = " ion-padding" >Hello World!</IonContent >
@@ -18,7 +18,7 @@ function Example() {
18
18
<IonPopover trigger = " hover-trigger" triggerAction = " hover" >
19
19
<IonContent class = " ion-padding" >Hello World!</IonContent >
20
20
</IonPopover >
21
- </div >
21
+ </IonContent >
22
22
);
23
23
}
24
24
export default Example ;
Original file line number Diff line number Diff line change 1
1
``` html
2
2
<template >
3
- <div >
3
+ <ion-content >
4
4
<ion-button id =" click-trigger" >Left-Click Me</ion-button >
5
5
<ion-popover trigger =" click-trigger" trigger-action =" click" >
6
6
<ion-content class =" ion-padding" >Hello World!</ion-content >
15
15
<ion-popover trigger =" hover-trigger" trigger-action =" hover" >
16
16
<ion-content class =" ion-padding" >Hello World!</ion-content >
17
17
</ion-popover >
18
- </div >
18
+ </ion-content >
19
19
</template >
20
20
21
21
<script lang =" ts" >
You can’t perform that action at this time.
0 commit comments