-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(vue): add usage docs for all non-controller components (#17643)
- Loading branch information
Showing
91 changed files
with
5,645 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
```html | ||
<template> | ||
<ion-avatar> | ||
<img src="https://gravatar.com/avatar/dba6bae8c566f9d4041fb9cd9ada7741?d=identicon&f=y"> | ||
</ion-avatar> | ||
|
||
<ion-chip> | ||
<ion-avatar> | ||
<img src="https://gravatar.com/avatar/dba6bae8c566f9d4041fb9cd9ada7741?d=identicon&f=y"> | ||
</ion-avatar> | ||
<ion-label>Chip Avatar</ion-label> | ||
</ion-chip> | ||
|
||
<ion-item> | ||
<ion-avatar slot="start"> | ||
<img src="https://gravatar.com/avatar/dba6bae8c566f9d4041fb9cd9ada7741?d=identicon&f=y"> | ||
</ion-avatar> | ||
<ion-label>Item Avatar</ion-label> | ||
</ion-item> | ||
</template> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
```html | ||
<template> | ||
<!-- Default back button --> | ||
<ion-header> | ||
<ion-toolbar> | ||
<ion-buttons slot="start"> | ||
<ion-back-button></ion-back-button> | ||
</ion-buttons> | ||
</ion-toolbar> | ||
</ion-header> | ||
|
||
<!-- Back button with a default href --> | ||
<ion-header> | ||
<ion-toolbar> | ||
<ion-buttons slot="start"> | ||
<ion-back-button defaultHref="home"></ion-back-button> | ||
</ion-buttons> | ||
</ion-toolbar> | ||
</ion-header> | ||
|
||
<!-- Back button with custom text and icon --> | ||
<ion-header> | ||
<ion-toolbar> | ||
<ion-buttons slot="start"> | ||
<ion-back-button | ||
:text="buttonText" | ||
:icon="buttonIcon"> | ||
</ion-back-button> | ||
</ion-buttons> | ||
</ion-toolbar> | ||
</ion-header> | ||
|
||
<!-- Back button with no text and custom icon --> | ||
<ion-header> | ||
<ion-toolbar> | ||
<ion-buttons slot="start"> | ||
<ion-back-button text="" icon="add"></ion-back-button> | ||
</ion-buttons> | ||
</ion-toolbar> | ||
</ion-header> | ||
|
||
<!-- Danger back button next to a menu button --> | ||
<ion-header> | ||
<ion-toolbar> | ||
<ion-buttons slot="start"> | ||
<ion-menu-button></ion-menu-button> | ||
<ion-back-button color="danger"></ion-back-button> | ||
</ion-buttons> | ||
</ion-toolbar> | ||
</ion-header> | ||
</template> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
```html | ||
<template> | ||
<!-- Default backdrop --> | ||
<ion-backdrop></ion-backdrop> | ||
|
||
<!-- Backdrop that is not tappable --> | ||
<ion-backdrop tappable="false"></ion-backdrop> | ||
|
||
<!-- Backdrop that is not visible --> | ||
<ion-backdrop visible="false"></ion-backdrop> | ||
|
||
<!-- Backdrop with propagation --> | ||
<ion-backdrop stopPropagation="false"></ion-backdrop> | ||
|
||
<!-- Backdrop that sets dynamic properties --> | ||
<ion-backdrop | ||
:tappable="enableBackdropDismiss" | ||
:visible="showBackdrop" | ||
:stopPropagation="shouldPropagate"> | ||
</ion-backdrop> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { Component, Vue } from 'vue-property-decorator'; | ||
@Component() | ||
export default class Menu extends Vue { | ||
backdropDismiss = false; | ||
showBackdrop = false; | ||
shouldPropagate = false; | ||
} | ||
</script> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
```html | ||
<template> | ||
<!-- Default --> | ||
<ion-badge>99</ion-badge> | ||
|
||
<!-- Colors --> | ||
<ion-badge color="primary">11</ion-badge> | ||
<ion-badge color="secondary">22</ion-badge> | ||
<ion-badge color="tertiary">33</ion-badge> | ||
<ion-badge color="success">44</ion-badge> | ||
<ion-badge color="warning">55</ion-badge> | ||
<ion-badge color="danger">66</ion-badge> | ||
<ion-badge color="light">77</ion-badge> | ||
<ion-badge color="medium">88</ion-badge> | ||
<ion-badge color="dark">99</ion-badge> | ||
|
||
<!-- Item with badge on left and right --> | ||
<ion-item> | ||
<ion-badge slot="start">11</ion-badge> | ||
<ion-label>My Item</ion-label> | ||
<ion-badge slot="end">22</ion-badge> | ||
</ion-item> | ||
</template> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.