octicon-rss(16/)
You've already forked ionic-framework
mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 22:44:13 +08:00
feat(base-components): add ability to remove ios and md theme (#26669)
This commit is contained in:
octicon-git-branch(16/)
octicon-tag(16/)
committed by
GitHub
gitea-unlock(16/)
parent
4d24b328e2
commit
18f109c7da
octicon-diff(16/tw-mr-1) 114 changed files with 1585 additions and 383 deletions
@@ -1,4 +1,5 @@
|
||||
@import "../../themes/ionic.globals";
|
||||
@import "./tab-bar.vars.scss";
|
||||
|
||||
:host {
|
||||
/**
|
||||
@@ -15,6 +16,7 @@
|
||||
justify-content: center;
|
||||
|
||||
width: auto;
|
||||
height: $tab-bar-height;
|
||||
|
||||
padding-bottom: var(--ion-safe-area-bottom, 0);
|
||||
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
import type { ComponentInterface, EventEmitter } from '@stencil/core';
|
||||
import { Component, Element, Event, Host, Prop, State, Watch, h } from '@stencil/core';
|
||||
|
||||
import { getIonMode } from '../../global/ionic-global';
|
||||
import { getIonStylesheet } from '../../global/ionic-global';
|
||||
import type { Color, TabBarChangedEventDetail } from '../../interface';
|
||||
import type { KeyboardController } from '../../utils/keyboard/keyboard-controller';
|
||||
import { createKeyboardController } from '../../utils/keyboard/keyboard-controller';
|
||||
import { createColorClasses } 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.
|
||||
*/
|
||||
@Component({
|
||||
tag: 'ion-tab-bar',
|
||||
styleUrls: {
|
||||
base: 'tab-bar.scss',
|
||||
ios: 'tab-bar.ios.scss',
|
||||
md: 'tab-bar.md.scss',
|
||||
},
|
||||
@@ -73,7 +75,7 @@ export class TabBar implements ComponentInterface {
|
||||
|
||||
render() {
|
||||
const { color, translucent, keyboardVisible } = this;
|
||||
const mode = getIonMode(this);
|
||||
const mode = getIonStylesheet(this);
|
||||
const shouldHide = keyboardVisible && this.el.getAttribute('slot') !== 'top';
|
||||
|
||||
return (
|
||||
|
||||
9
core/src/components/tab-bar/tab-bar.vars.scss
Normal file
9
core/src/components/tab-bar/tab-bar.vars.scss
Normal file
@@ -0,0 +1,9 @@
|
||||
// Base Tab Bar
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Default height of the tab bar.
|
||||
/**
|
||||
* We choose an explicit height otherwise the tab bar will
|
||||
* appear to be hidden when using base components.
|
||||
*/
|
||||
$tab-bar-height: 50px !default;
|
||||
Reference in New Issue
Block a user