docs(stencil): add stencil usage to components (#21261)

This commit is contained in:
Brandy Carney
2020-05-12 20:35:48 -04:00
committed by GitHub
parent 703ef5c992
commit 687122127c
177 changed files with 11207 additions and 897 deletions

View File

@@ -38,7 +38,7 @@ By default, the split pane will expand when the screen is larger than 992px. To
```html
<ion-split-pane contentId="main">
<!-- our side menu -->
<!-- the side menu -->
<ion-menu contentId="main">
<ion-header>
<ion-toolbar>
@@ -57,7 +57,7 @@ By default, the split pane will expand when the screen is larger than 992px. To
```html
<ion-split-pane content-id="main">
<!-- our side menu -->
<!-- the side menu -->
<ion-menu content-id="main">
<ion-header>
<ion-toolbar>
@@ -92,7 +92,7 @@ import {
export const SplitPlaneExample: React.SFC<{}> = () => (
<IonContent>
<IonSplitPane contentId="main">
{/*-- our side menu --*/}
{/*-- the side menu --*/}
<IonMenu contentId="main">
<IonHeader>
<IonToolbar>
@@ -109,12 +109,43 @@ export const SplitPlaneExample: React.SFC<{}> = () => (
```
### Stencil
```tsx
import { Component, h } from '@stencil/core';
@Component({
tag: 'split-pane-example',
styleUrl: 'split-pane-example.css'
})
export class SplitPaneExample {
render() {
return [
<ion-split-pane content-id="main">
{/* the side menu */}
<ion-menu content-id="main">
<ion-header>
<ion-toolbar>
<ion-title>Menu</ion-title>
</ion-toolbar>
</ion-header>
</ion-menu>
{/* the main content */}
<ion-router-outlet id="main"></ion-router-outlet>
</ion-split-pane>
];
}
}
```
### Vue
```html
<template>
<ion-split-pane content-id="main">
<!-- our side menu -->
<!-- the side menu -->
<ion-menu content-id="main">
<ion-header>
<ion-toolbar>

View File

@@ -1,6 +1,6 @@
```html
<ion-split-pane contentId="main">
<!-- our side menu -->
<!-- the side menu -->
<ion-menu contentId="main">
<ion-header>
<ion-toolbar>

View File

@@ -1,6 +1,6 @@
```html
<ion-split-pane content-id="main">
<!-- our side menu -->
<!-- the side menu -->
<ion-menu content-id="main">
<ion-header>
<ion-toolbar>

View File

@@ -14,7 +14,7 @@ import {
export const SplitPlaneExample: React.SFC<{}> = () => (
<IonContent>
<IonSplitPane contentId="main">
{/*-- our side menu --*/}
{/*-- the side menu --*/}
<IonMenu contentId="main">
<IonHeader>
<IonToolbar>

View File

@@ -0,0 +1,27 @@
```tsx
import { Component, h } from '@stencil/core';
@Component({
tag: 'split-pane-example',
styleUrl: 'split-pane-example.css'
})
export class SplitPaneExample {
render() {
return [
<ion-split-pane content-id="main">
{/* the side menu */}
<ion-menu content-id="main">
<ion-header>
<ion-toolbar>
<ion-title>Menu</ion-title>
</ion-toolbar>
</ion-header>
</ion-menu>
{/* the main content */}
<ion-router-outlet id="main"></ion-router-outlet>
</ion-split-pane>
];
}
}
```

View File

@@ -1,7 +1,7 @@
```html
<template>
<ion-split-pane content-id="main">
<!-- our side menu -->
<!-- the side menu -->
<ion-menu content-id="main">
<ion-header>
<ion-toolbar>