feat(base-components): add ability to remove ios and md theme (#26669)

This commit is contained in:
Liam DeBeasi
2023-01-24 16:18:35 -05:00
committed by GitHub
parent 4d24b328e2
commit 18f109c7da
114 changed files with 1585 additions and 383 deletions

View File

@ -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,