mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-17 02:31:34 +08:00
refactor(all): updating to newest stencil apis (#18578)
* chore(): update ionicons * refactor(all): updating to newest stencil apis * fix lint issues * more changes * moreee * fix treeshaking * fix config * fix checkbox * fix stuff * chore(): update ionicons * fix linting errors
This commit is contained in:
@ -1,7 +1,8 @@
|
||||
import { Component, ComponentInterface, Prop, h } from '@stencil/core';
|
||||
|
||||
import { config } from '../../global/config';
|
||||
import { getIonMode } from '../../global/ionic-global';
|
||||
import { Config, SpinnerTypes } from '../../interface';
|
||||
import { SpinnerTypes } from '../../interface';
|
||||
import { sanitizeDOMString } from '../../utils/sanitization';
|
||||
|
||||
@Component({
|
||||
@ -13,8 +14,6 @@ import { sanitizeDOMString } from '../../utils/sanitization';
|
||||
})
|
||||
export class InfiniteScrollContent implements ComponentInterface {
|
||||
|
||||
@Prop({ context: 'config' }) config!: Config;
|
||||
|
||||
/**
|
||||
* An animated SVG spinner that shows while loading.
|
||||
*/
|
||||
@ -34,9 +33,9 @@ export class InfiniteScrollContent implements ComponentInterface {
|
||||
componentDidLoad() {
|
||||
if (this.loadingSpinner === undefined) {
|
||||
const mode = getIonMode(this);
|
||||
this.loadingSpinner = this.config.get(
|
||||
this.loadingSpinner = config.get(
|
||||
'infiniteLoadingSpinner',
|
||||
this.config.get('spinner', mode === 'ios' ? 'lines' : 'crescent')
|
||||
config.get('spinner', mode === 'ios' ? 'lines' : 'crescent')
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -45,7 +44,7 @@ export class InfiniteScrollContent implements ComponentInterface {
|
||||
const mode = getIonMode(this);
|
||||
return {
|
||||
class: {
|
||||
[`${mode}`]: true,
|
||||
[mode]: true,
|
||||
|
||||
// Used internally for styling
|
||||
[`infinite-scroll-content-${mode}`]: true
|
||||
|
Reference in New Issue
Block a user