mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 16:16:41 +08:00
feat(base-components): add ability to remove ios and md theme (#26669)
This commit is contained in:
@ -3,7 +3,7 @@ import { Component, Element, Host, Prop, h } from '@stencil/core';
|
||||
import { arrowDown, caretBackSharp } from 'ionicons/icons';
|
||||
|
||||
import { config } from '../../global/config';
|
||||
import { getIonMode } from '../../global/ionic-global';
|
||||
import { getIonStylesheet, getIonBehavior } from '../../global/ionic-global';
|
||||
import type { SpinnerTypes } from '../../interface';
|
||||
import { isPlatform } from '../../utils/platform';
|
||||
import type { IonicSafeString } from '../../utils/sanitization';
|
||||
@ -52,18 +52,18 @@ export class RefresherContent implements ComponentInterface {
|
||||
|
||||
componentWillLoad() {
|
||||
if (this.pullingIcon === undefined) {
|
||||
const mode = getIonMode(this);
|
||||
const platform = getIonBehavior(this);
|
||||
const overflowRefresher = (this.el.style as any).webkitOverflowScrolling !== undefined ? 'lines' : arrowDown;
|
||||
this.pullingIcon = config.get(
|
||||
'refreshingIcon',
|
||||
mode === 'ios' && isPlatform('mobile') ? config.get('spinner', overflowRefresher) : 'circular'
|
||||
platform === 'ios' && isPlatform('mobile') ? config.get('spinner', overflowRefresher) : 'circular'
|
||||
);
|
||||
}
|
||||
if (this.refreshingSpinner === undefined) {
|
||||
const mode = getIonMode(this);
|
||||
const platform = getIonBehavior(this);
|
||||
this.refreshingSpinner = config.get(
|
||||
'refreshingSpinner',
|
||||
config.get('spinner', mode === 'ios' ? 'lines' : 'circular')
|
||||
config.get('spinner', platform === 'ios' ? 'lines' : 'circular')
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -71,7 +71,7 @@ export class RefresherContent implements ComponentInterface {
|
||||
render() {
|
||||
const pullingIcon = this.pullingIcon;
|
||||
const hasSpinner = pullingIcon != null && (SPINNERS[pullingIcon] as any) !== undefined;
|
||||
const mode = getIonMode(this);
|
||||
const mode = getIonStylesheet(this);
|
||||
|
||||
return (
|
||||
<Host class={mode}>
|
||||
|
||||
Reference in New Issue
Block a user