Skip to content

Commit

Permalink
put more focus/detail on slots API
Browse files Browse the repository at this point in the history
  • Loading branch information
amandaesmith3 committed Feb 1, 2024
1 parent 01d668a commit eeed774
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/react/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ Here in our `IonContent`, we're adding an `IonList` and a much more involved `Io
</IonItem>
```

Item is important as it clearly shows the mix of React concepts and Web Component concepts. From the Web Components side, 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.
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).)

This comment has been minimized.

Copy link
@sean-perkins

sean-perkins Feb 5, 2024

Contributor

~ My only suggestion would be increasing the link target to include [see the MDN docs here]. It will announce more appropriately to screen readers.

This comment has been minimized.

Copy link
@averyjohnston

averyjohnston Feb 5, 2024

Contributor

Done in 8744bd9 👍


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.

Expand Down
2 changes: 1 addition & 1 deletion docs/vue/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ Here in our `IonContent`, we are adding an `IonList` and a much more involved `I
</ion-item>
```

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. Additionally, this is different from the slots API you may recall from Vue 2.
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).)

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.

Expand Down

0 comments on commit eeed774

Please sign in to comment.