Skip to content

Commit 7f25e7b

Browse files
committed
test(popover): add popover examples with inputs and buttons
1 parent 0db5da6 commit 7f25e7b

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

core/src/components/popover/test/basic/index.html

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,20 @@
7676
>
7777
Popover With Textarea
7878
</button>
79+
<button
80+
id="popover-with-input"
81+
class="expand"
82+
onclick="presentPopover({ component: 'input-page', event: event, htmlAttributes: { 'data-testid': 'popover-with-input'} })"
83+
>
84+
Popover With Input
85+
</button>
86+
<button
87+
id="popover-with-buttons"
88+
class="expand"
89+
onclick="presentPopover({ component: 'buttons-page', event: event, htmlAttributes: { 'data-testid': 'popover-with-buttons'} })"
90+
>
91+
Popover With Buttons
92+
</button>
7993
</ion-content>
8094

8195
<style>
@@ -225,6 +239,38 @@ <h1>Translucent Popover</h1>
225239
}
226240

227241
customElements.define('textarea-page', TextAreaPage);
242+
243+
class InputPage extends HTMLElement {
244+
constructor() {
245+
super();
246+
}
247+
248+
connectedCallback() {
249+
this.innerHTML = `
250+
<ion-content>
251+
<ion-input aria-label="input" value="the cursor in this <ion-input> must be able to be moved with the arrow keys and home and end keys"></ion-input>
252+
<input value="the cursor in this <input> must be able to be moved with the arrow keys and home and end keys"></input>
253+
</ion-content>
254+
`;
255+
}
256+
}
257+
customElements.define('input-page', InputPage);
258+
259+
class ButtonsPage extends HTMLElement {
260+
constructor() {
261+
super();
262+
}
263+
264+
connectedCallback() {
265+
this.innerHTML = `
266+
<ion-content>
267+
<ion-button>Button 1</ion-button>
268+
<ion-button>Button 2</ion-button>
269+
</ion-content>
270+
`;
271+
}
272+
}
273+
customElements.define('buttons-page', ButtonsPage);
228274
</script>
229275
</ion-app>
230276
</body>

0 commit comments

Comments
 (0)