diff --git a/static/usage/v7/accordion/listen-changes/angular/example_component_html.md b/static/usage/v7/accordion/listen-changes/angular/example_component_html.md
index a70ad5e3be6..d48c34dd4f4 100644
--- a/static/usage/v7/accordion/listen-changes/angular/example_component_html.md
+++ b/static/usage/v7/accordion/listen-changes/angular/example_component_html.md
@@ -19,6 +19,4 @@
Third Content
-
-
```
diff --git a/static/usage/v7/accordion/listen-changes/angular/example_component_ts.md b/static/usage/v7/accordion/listen-changes/angular/example_component_ts.md
index c14734aba72..3ebbccce6f7 100644
--- a/static/usage/v7/accordion/listen-changes/angular/example_component_ts.md
+++ b/static/usage/v7/accordion/listen-changes/angular/example_component_ts.md
@@ -1,27 +1,20 @@
```ts
-import { Component, ElementRef, ViewChild } from '@angular/core';
+import { Component } from '@angular/core';
@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
})
export class ExampleComponent {
- @ViewChild('listenerOut', { static: true }) listenerOut: ElementRef;
private values: string[] = ['first', 'second', 'third'];
accordionGroupChange = (ev: any) => {
- const nativeEl = this.listenerOut.nativeElement;
- if (!nativeEl) {
- return;
- }
-
const collapsedItems = this.values.filter((value) => value !== ev.detail.value);
const selectedValue = ev.detail.value;
- nativeEl.innerText = `
- Expanded: ${selectedValue === undefined ? 'None' : ev.detail.value}
- Collapsed: ${collapsedItems.join(', ')}
- `;
+ console.log(
+ `Expanded: ${selectedValue === undefined ? 'None' : ev.detail.value} | Collapsed: ${collapsedItems.join(', ')}`
+ );
};
}
```
diff --git a/static/usage/v7/accordion/listen-changes/demo.html b/static/usage/v7/accordion/listen-changes/demo.html
index bbf4c5bfcab..104c0bd5da3 100644
--- a/static/usage/v7/accordion/listen-changes/demo.html
+++ b/static/usage/v7/accordion/listen-changes/demo.html
@@ -8,11 +8,6 @@
-
@@ -39,25 +34,23 @@
Third Content
-
-
diff --git a/static/usage/v7/accordion/listen-changes/index.md b/static/usage/v7/accordion/listen-changes/index.md
index a10dd609b4f..ba6c8134f00 100644
--- a/static/usage/v7/accordion/listen-changes/index.md
+++ b/static/usage/v7/accordion/listen-changes/index.md
@@ -22,4 +22,5 @@ import angular_example_component_ts from './angular/example_component_ts.md';
}}
size="320px"
src="usage/v7/accordion/listen-changes/demo.html"
+ showConsole={true}
/>
diff --git a/static/usage/v7/accordion/listen-changes/javascript.md b/static/usage/v7/accordion/listen-changes/javascript.md
index e7085ca86eb..e47e3311a08 100644
--- a/static/usage/v7/accordion/listen-changes/javascript.md
+++ b/static/usage/v7/accordion/listen-changes/javascript.md
@@ -20,21 +20,17 @@
-
-
```
diff --git a/static/usage/v7/accordion/listen-changes/react.md b/static/usage/v7/accordion/listen-changes/react.md
index eb76312b62a..98b4b7fc3e2 100644
--- a/static/usage/v7/accordion/listen-changes/react.md
+++ b/static/usage/v7/accordion/listen-changes/react.md
@@ -1,54 +1,44 @@
```tsx
-import React, { useRef } from 'react';
+import React from 'react';
import { IonAccordion, IonAccordionGroup, IonItem, IonLabel, AccordionGroupCustomEvent } from '@ionic/react';
function Example() {
- const listenerOut = useRef(null);
const values = ['first', 'second', 'third'];
const accordionGroupChange = (ev: AccordionGroupCustomEvent) => {
- const nativeEl = listenerOut.current;
- if (!nativeEl) {
- return;
- }
-
const collapsedItems = values.filter((value) => value !== ev.detail.value);
const selectedValue = ev.detail.value;
- nativeEl.innerText = `
- Expanded: ${selectedValue === undefined ? 'None' : ev.detail.value}
- Collapsed: ${collapsedItems.join(', ')}
- `;
+ console.log(
+ `Expanded: ${selectedValue === undefined ? 'None' : ev.detail.value} | Collapsed: ${collapsedItems.join(', ')}`
+ );
};
return (
- <>
-
-
-
- First Accordion
-
-
- First Content
-
-
-
-
- Second Accordion
-
-
- Second Content
-
-
-
-
- Third Accordion
-
-
- Third Content
-
-
-
-
- >
+
+
+
+ First Accordion
+
+
+ First Content
+
+
+
+
+ Second Accordion
+
+
+ Second Content
+
+
+
+
+ Third Accordion
+
+
+ Third Content
+
+
+
);
}
export default Example;
diff --git a/static/usage/v7/accordion/listen-changes/vue.md b/static/usage/v7/accordion/listen-changes/vue.md
index 0086a788ac0..60607870264 100644
--- a/static/usage/v7/accordion/listen-changes/vue.md
+++ b/static/usage/v7/accordion/listen-changes/vue.md
@@ -20,13 +20,11 @@
Third Content
-
-
diff --git a/static/usage/v7/action-sheet/role-info-on-dismiss/angular/example_component_css.md b/static/usage/v7/action-sheet/role-info-on-dismiss/angular/example_component_css.md
index 5058c1b3377..6bf8f4dc7fc 100644
--- a/static/usage/v7/action-sheet/role-info-on-dismiss/angular/example_component_css.md
+++ b/static/usage/v7/action-sheet/role-info-on-dismiss/angular/example_component_css.md
@@ -6,8 +6,4 @@
flex-direction: column;
height: 100%;
}
-
-code {
- white-space: pre-wrap;
-}
```
diff --git a/static/usage/v7/action-sheet/role-info-on-dismiss/angular/example_component_html.md b/static/usage/v7/action-sheet/role-info-on-dismiss/angular/example_component_html.md
index 6a1d54531f9..7896f219737 100644
--- a/static/usage/v7/action-sheet/role-info-on-dismiss/angular/example_component_html.md
+++ b/static/usage/v7/action-sheet/role-info-on-dismiss/angular/example_component_html.md
@@ -6,9 +6,7 @@
header="Example header"
subHeader="Example subheader"
[buttons]="actionSheetButtons"
- (didDismiss)="setResult($event)"
+ (didDismiss)="logResult($event)"
>
-
- {{ result }}
```
diff --git a/static/usage/v7/action-sheet/role-info-on-dismiss/angular/example_component_ts.md b/static/usage/v7/action-sheet/role-info-on-dismiss/angular/example_component_ts.md
index 95ba12c92f2..a38c0b92307 100644
--- a/static/usage/v7/action-sheet/role-info-on-dismiss/angular/example_component_ts.md
+++ b/static/usage/v7/action-sheet/role-info-on-dismiss/angular/example_component_ts.md
@@ -7,7 +7,6 @@ import { Component } from '@angular/core';
styleUrls: ['./example.component.css'],
})
export class ExampleComponent {
- result: string;
public actionSheetButtons = [
{
text: 'Delete',
@@ -33,8 +32,8 @@ export class ExampleComponent {
constructor() {}
- setResult(ev) {
- this.result = JSON.stringify(ev.detail, null, 2);
+ logResult(ev) {
+ console.log(JSON.stringify(ev.detail, null, 2));
}
}
```
diff --git a/static/usage/v7/action-sheet/role-info-on-dismiss/demo.html b/static/usage/v7/action-sheet/role-info-on-dismiss/demo.html
index f458e0f2aaa..ff9583515c2 100644
--- a/static/usage/v7/action-sheet/role-info-on-dismiss/demo.html
+++ b/static/usage/v7/action-sheet/role-info-on-dismiss/demo.html
@@ -13,10 +13,6 @@
.container {
flex-direction: column;
}
-
- code {
- white-space: pre-wrap;
- }
@@ -30,14 +26,11 @@
header="Example header"
sub-header="Example subheader"
>
-
-