fix(): update to Stencil One 🎉🎊

This commit is contained in:
Manu MA
2019-06-19 21:33:50 +02:00
committed by GitHub
parent 7f1829eb21
commit b40f7d36d5
572 changed files with 14833 additions and 10323 deletions

View File

@ -1,6 +1,6 @@
import { Component, ComponentInterface } from '@stencil/core';
import { Component, ComponentInterface, h } from '@stencil/core';
import { Mode } from '../../interface';
import { getIonMode } from '../../global/ionic-global';
@Component({
tag: 'ion-avatar',
@ -11,12 +11,13 @@ import { Mode } from '../../interface';
shadow: true
})
export class Avatar implements ComponentInterface {
mode!: Mode;
hostData() {
const mode = getIonMode(this);
return {
class: {
[`${this.mode}`]: true,
[`${mode}`]: true,
}
};
}

View File

@ -37,10 +37,10 @@ Avatars can be used by themselves or inside of any element. If placed inside of
```tsx
import React from 'react'
import { IonAvatar, IonChip, IonItem, IonLabel } from '@ionic/react';
import { IonAvatar, IonChip, IonItem, IonLabel, IonContent } from '@ionic/react';
const AvatarExample: React.SFC<{}> = () => (
<>
export const AvatarExample: React.FunctionComponent = () => (
<IonContent>
<IonAvatar>
<img src="https://gravatar.com/avatar/dba6bae8c566f9d4041fb9cd9ada7741?d=identicon&f=y" />
</IonAvatar>
@ -58,10 +58,8 @@ const AvatarExample: React.SFC<{}> = () => (
</IonAvatar>
<IonLabel>Item Avatar</IonLabel>
</IonItem>
</>
</IonContent>
);
export default AvatarExample;
```

View File

@ -8,8 +8,8 @@
<link href="../../../../../css/ionic.bundle.css" rel="stylesheet">
<link href="../../../../../scripts/testing/styles.css" rel="stylesheet">
<script src="../../../../../scripts/testing/scripts.js"></script>
<script src="../../../../../dist/ionic.js"></script>
</head>
<script nomodule src="../../../../../dist/ionic/ionic.js"></script>
<script type="module" src="../../../../../dist/ionic/ionic.esm.js"></script></head>
<body>
<ion-app>

View File

@ -8,8 +8,8 @@
<link href="../../../../../css/ionic.bundle.css" rel="stylesheet">
<link href="../../../../../scripts/testing/styles.css" rel="stylesheet">
<script src="../../../../../scripts/testing/scripts.js"></script>
<script src="../../../../../dist/ionic.js"></script>
</head>
<script nomodule src="../../../../../dist/ionic/ionic.js"></script>
<script type="module" src="../../../../../dist/ionic/ionic.esm.js"></script></head>
<body>
<ion-app>

View File

@ -8,8 +8,8 @@
<link href="../../../../../css/core.css" rel="stylesheet">
<link href="../../../../../scripts/testing/styles.css" rel="stylesheet">
<script src="../../../../../scripts/testing/scripts.js"></script>
<script src="../../../../../dist/ionic.js"></script>
</head>
<script nomodule src="../../../../../dist/ionic/ionic.js"></script>
<script type="module" src="../../../../../dist/ionic/ionic.esm.js"></script></head>
<body class="ion-padding">
<h1>Default</h1>

View File

@ -1,9 +1,9 @@
```tsx
import React from 'react'
import { IonAvatar, IonChip, IonItem, IonLabel } from '@ionic/react';
import { IonAvatar, IonChip, IonItem, IonLabel, IonContent } from '@ionic/react';
const AvatarExample: React.SFC<{}> = () => (
<>
export const AvatarExample: React.FunctionComponent = () => (
<IonContent>
<IonAvatar>
<img src="https://gravatar.com/avatar/dba6bae8c566f9d4041fb9cd9ada7741?d=identicon&f=y" />
</IonAvatar>
@ -21,8 +21,6 @@ const AvatarExample: React.SFC<{}> = () => (
</IonAvatar>
<IonLabel>Item Avatar</IonLabel>
</IonItem>
</>
</IonContent>
);
export default AvatarExample;
```