mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 08:09:32 +08:00
feat(base-components): add ability to remove ios and md theme (#26669)
This commit is contained in:
@ -2,14 +2,19 @@ import type { ComponentInterface } from '@stencil/core';
|
||||
import { Component, Host, Prop, h } from '@stencil/core';
|
||||
|
||||
import { config } from '../../global/config';
|
||||
import { getIonMode } from '../../global/ionic-global';
|
||||
import { getIonStylesheet, getIonBehavior } from '../../global/ionic-global';
|
||||
import type { SpinnerTypes } from '../../interface';
|
||||
import type { IonicSafeString } from '../../utils/sanitization';
|
||||
import { sanitizeDOMString } from '../../utils/sanitization';
|
||||
|
||||
/**
|
||||
* @virtualProp {true | false} useBase - useBase determines if base components is enabled.
|
||||
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
|
||||
*/
|
||||
@Component({
|
||||
tag: 'ion-infinite-scroll-content',
|
||||
styleUrls: {
|
||||
base: 'infinite-scroll-content.scss',
|
||||
ios: 'infinite-scroll-content.ios.scss',
|
||||
md: 'infinite-scroll-content.md.scss',
|
||||
},
|
||||
@ -33,16 +38,16 @@ export class InfiniteScrollContent implements ComponentInterface {
|
||||
|
||||
componentDidLoad() {
|
||||
if (this.loadingSpinner === undefined) {
|
||||
const mode = getIonMode(this);
|
||||
const platform = getIonBehavior(this);
|
||||
this.loadingSpinner = config.get(
|
||||
'infiniteLoadingSpinner',
|
||||
config.get('spinner', mode === 'ios' ? 'lines' : 'crescent')
|
||||
config.get('spinner', platform === 'ios' ? 'lines' : 'crescent')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const mode = getIonMode(this);
|
||||
const mode = getIonStylesheet(this);
|
||||
return (
|
||||
<Host
|
||||
class={{
|
||||
|
||||
Reference in New Issue
Block a user