Skip to content

Commit fb65b85

Browse files
committed
docs(react): use better title change example
1 parent 71914da commit fb65b85

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

docs/react/your-first-app.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,21 @@ export default Tab2;
170170
`IonHeader` represents the top navigation and toolbar, with "Tab 2" as the title (there are two of them due to iOS [Collapsible Large Title](../api/title.md#collapsible-large-titles) support). Let’s rename both `IonTitle` elements to:
171171

172172
```tsx
173-
<IonTitle>Photo Gallery</IonTitle>
173+
<IonPage>
174+
<IonHeader>
175+
<IonToolbar>
176+
<IonTitle>Photo Gallery</IonTitle>
177+
</IonToolbar>
178+
</IonHeader>
179+
<IonContent>
180+
<IonHeader collapse="condense">
181+
<IonToolbar>
182+
<IonTitle size="large">Photo Gallery</IonTitle>
183+
</IonToolbar>
184+
</IonHeader>
185+
</IonContent>
186+
{/* ...existing code... */}
187+
</IonPage>
174188
```
175189

176190
We put the visual aspects of our app into `<IonContent>`. In this case, it’s where we’ll add a button that opens the device’s camera as well as displays the image captured by the camera. Start by adding a [floating action button](../api/fab.md) (FAB) to the bottom of the page and set the camera image as the icon.

versioned_docs/version-v7/react/your-first-app.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,21 @@ export default Tab2;
170170
`IonHeader` represents the top navigation and toolbar, with "Tab 2" as the title (there are two of them due to iOS [Collapsible Large Title](../api/title.md#collapsible-large-titles) support). Let’s rename both `IonTitle` elements to:
171171

172172
```tsx
173-
<IonTitle>Photo Gallery</IonTitle>
173+
<IonPage>
174+
<IonHeader>
175+
<IonToolbar>
176+
<IonTitle>Photo Gallery</IonTitle>
177+
</IonToolbar>
178+
</IonHeader>
179+
<IonContent>
180+
<IonHeader collapse="condense">
181+
<IonToolbar>
182+
<IonTitle size="large">Photo Gallery</IonTitle>
183+
</IonToolbar>
184+
</IonHeader>
185+
</IonContent>
186+
{/* ...existing code... */}
187+
</IonPage>
174188
```
175189

176190
We put the visual aspects of our app into `<IonContent>`. In this case, it’s where we’ll add a button that opens the device’s camera as well as displays the image captured by the camera. Start by adding a [floating action button](../api/fab.md) (FAB) to the bottom of the page and set the camera image as the icon.

0 commit comments

Comments
 (0)