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,7 +2,7 @@ import type { ComponentInterface, EventEmitter } from '@stencil/core';
|
||||
import { Watch, Component, Element, Event, h, Host, Method, Prop } from '@stencil/core';
|
||||
|
||||
import { config } from '../../global/config';
|
||||
import { getIonMode } from '../../global/ionic-global';
|
||||
import { getIonStylesheet } from '../../global/ionic-global';
|
||||
import type {
|
||||
AnimationBuilder,
|
||||
Color,
|
||||
@ -35,6 +35,7 @@ import { mdLeaveAnimation } from './animations/md.leave';
|
||||
// TODO(FW-2832): types
|
||||
|
||||
/**
|
||||
* @virtualProp {true | false} useBase - useBase determines if base components is enabled.
|
||||
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
|
||||
*
|
||||
* @part button - Any button element that is displayed inside of the toast.
|
||||
@ -46,6 +47,7 @@ import { mdLeaveAnimation } from './animations/md.leave';
|
||||
@Component({
|
||||
tag: 'ion-toast',
|
||||
styleUrls: {
|
||||
base: 'toast.scss',
|
||||
ios: 'toast.ios.scss',
|
||||
md: 'toast.md.scss',
|
||||
},
|
||||
@ -367,7 +369,7 @@ export class Toast implements ComponentInterface, OverlayInterface {
|
||||
return;
|
||||
}
|
||||
|
||||
const mode = getIonMode(this);
|
||||
const mode = getIonStylesheet(this);
|
||||
const buttonGroupsClasses = {
|
||||
'toast-button-group': true,
|
||||
[`toast-button-group-${side}`]: true,
|
||||
@ -401,7 +403,7 @@ export class Toast implements ComponentInterface, OverlayInterface {
|
||||
const allButtons = this.getButtons();
|
||||
const startButtons = allButtons.filter((b) => b.side === 'start');
|
||||
const endButtons = allButtons.filter((b) => b.side !== 'start');
|
||||
const mode = getIonMode(this);
|
||||
const mode = getIonStylesheet(this);
|
||||
const wrapperClass = {
|
||||
'toast-wrapper': true,
|
||||
[`toast-${this.position}`]: true,
|
||||
|
||||
Reference in New Issue
Block a user