You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/react/quickstart.md
+6-10Lines changed: 6 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -171,7 +171,7 @@ When creating your own pages, don't forget to have `IonPage` be the root compone
171
171
Our current content is relatively simple but does not contain anything that could be used in a real app, so let's change that.
172
172
173
173
:::note
174
-
For brevity, we're excluding repeating part of our component, like the function declaration or import statements for other components.
174
+
For brevity, we're excluding repeating parts of our component, like the function declaration or import statements for other components.
175
175
:::
176
176
177
177
```tsx
@@ -180,11 +180,10 @@ For brevity, we're excluding repeating part of our component, like the function
180
180
<IonContent>
181
181
<IonList>
182
182
<IonItem>
183
-
<IonCheckboxslot="start" />
184
-
<IonLabel>
183
+
<IonCheckboxlabelPlacement="end"justify="start">
185
184
<h1>Create Idea</h1>
186
185
<IonNote>Run Idea by Brandy</IonNote>
187
-
</IonLabel>
186
+
</IonCheckbox>
188
187
<IonBadgecolor="success"slot="end">
189
188
5 Days
190
189
</IonBadge>
@@ -198,20 +197,17 @@ Here in our `IonContent`, we're adding an `IonList` and a much more involved `Io
198
197
199
198
```tsx
200
199
<IonItem>
201
-
<IonCheckboxslot="start" />
202
-
<IonLabel>
200
+
<IonCheckboxlabelPlacement="end"justify="start">
203
201
<h1>Create Idea</h1>
204
202
<IonNote>Run Idea by Brandy</IonNote>
205
-
</IonLabel>
203
+
</IonCheckbox>
206
204
<IonBadgecolor="success"slot="end">
207
205
5 Days
208
206
</IonBadge>
209
207
</IonItem>
210
208
```
211
209
212
-
Item is important as it clearly shows the mix of React concepts and Web Component concepts. The first clear example of a React concept is self-closing tags for React Components in `IonCheckbox`. This is just a simpler way of writing components that do not contain any child content.
213
-
214
-
From the Web Components side, we have a special attribute called `slot`. This is key for letting the `IonItem` know where to place the `IonCheckbox` when it renders. This is not a React API, but a web standards API.
210
+
Looking at our code, we have a special attribute called `slot`. This is key for letting the `IonItem` know where to place the `IonBadge` when it renders. This is not a React API, but a web standards API, and it is used in many Ionic Framework components. (For more information on slots, [see the MDN docs here](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot).)
215
211
216
212
Let's look at another component from Ionic, FAB. Floating Action Buttons are a nice way to provide a main action that is elevated from the rest of an app. For this FAB, we'll need three components: a FAB, a FAB Button, and an Icon.
Looking at our code, we have a special attribute called slot. This is key for letting the `IonItem` know where to place the `IonCheckbox` when it renders. This is not a Vue API, but a web standards API. Additionally, this is different from the slots API you may recall from Vue 2.
324
+
Looking at our code, we have a special attribute called `slot`. This is key for letting the `IonItem` know where to place the `IonBadge` when it renders. This is not a Vue API, but a web standards API, and it is used across many Ionic Framework components. Additionally, this is different from the slots API you may recall from Vue 2. (For more information on slots, [see the MDN docs here](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot).)
328
325
329
326
Let's look at another component from Ionic Framework, FAB. Floating Action Buttons are a nice way to provide a main action that is elevated from the rest of an app. For this FAB, we will need three components: a FAB, a FAB Button, and an Icon.
330
327
@@ -353,7 +350,6 @@ Let's look at another component from Ionic Framework, FAB. Floating Action Butto
0 commit comments