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 14426 additions and 9916 deletions

View File

@ -17,6 +17,21 @@ The refresher content contains the text, icon and spinner to display during a pu
| `refreshingText` | `refreshing-text` | The text you want to display when performing a refresh. `refreshingText` can accept either plaintext or HTML as a string. To display characters normally reserved for HTML, they must be escaped. For example `<Ionic>` would become `&lt;Ionic&gt;` For more information: [Security Documentation](https://ionicframework.com/docs/faq/security) | `string \| undefined` | `undefined` |
## Dependencies
### Depends on
- ion-icon
- [ion-spinner](../spinner)
### Graph
```mermaid
graph TD;
ion-refresher-content --> ion-icon
ion-refresher-content --> ion-spinner
style ion-refresher-content fill:#f9f,stroke:#333,stroke-width:4px
```
----------------------------------------------
*Built with [StencilJS](https://stenciljs.com/)*

View File

@ -1,6 +1,7 @@
import { Component, ComponentInterface, Prop } from '@stencil/core';
import { Component, ComponentInterface, Prop, h } from '@stencil/core';
import { Config, Mode, SpinnerTypes } from '../../interface';
import { getIonMode } from '../../global/ionic-global';
import { Config, SpinnerTypes } from '../../interface';
import { sanitizeDOMString } from '../../utils/sanitization';
@Component({
@ -8,8 +9,6 @@ import { sanitizeDOMString } from '../../utils/sanitization';
})
export class RefresherContent implements ComponentInterface {
mode!: Mode;
@Prop({ context: 'config' }) config!: Config;
/**
@ -49,17 +48,19 @@ export class RefresherContent implements ComponentInterface {
this.pullingIcon = this.config.get('refreshingIcon', 'arrow-down');
}
if (this.refreshingSpinner === undefined) {
const mode = getIonMode(this);
this.refreshingSpinner = this.config.get(
'refreshingSpinner',
this.config.get('spinner', this.mode === 'ios' ? 'lines' : 'crescent')
this.config.get('spinner', mode === 'ios' ? 'lines' : 'crescent')
);
}
}
hostData() {
const mode = getIonMode(this);
return {
class: {
[`${this.mode}`]: true,
[`${mode}`]: true,
}
};
}