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

@ -1,7 +1,7 @@
import type { ComponentInterface, EventEmitter } from '@stencil/core';
import { Component, Element, Event, Host, Prop, h } from '@stencil/core';
import { getIonMode } from '../../global/ionic-global';
import { getIonStylesheet } from '../../global/ionic-global';
import type { AnimationBuilder, Color, RouterDirection } from '../../interface';
import type { AnchorInterface, ButtonInterface } from '../../utils/element-interface';
import type { Attributes } from '../../utils/helpers';
@ -10,6 +10,7 @@ import { printIonWarning } from '../../utils/logging';
import { createColorClasses, hostContext, openURL } from '../../utils/theme';
/**
* @virtualProp {true | false} useBase - useBase determines if base components is enabled.
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
*
* @slot - Content is placed between the named slots if provided without a slot.
@ -22,6 +23,7 @@ import { createColorClasses, hostContext, openURL } from '../../utils/theme';
@Component({
tag: 'ion-button',
styleUrls: {
base: 'button.scss',
ios: 'button.ios.scss',
md: 'button.md.scss',
},
@ -244,7 +246,7 @@ export class Button implements ComponentInterface, AnchorInterface, ButtonInterf
};
render() {
const mode = getIonMode(this);
const mode = getIonStylesheet(this);
const {
buttonType,
type,