feat(core): expose base components config

This commit is contained in:
Liam DeBeasi 2022-11-17 20:15:11 +00:00
parent ef0d19c0f7
commit 9d449c39cd
5 changed files with 42 additions and 1 deletions

View File

@ -69,6 +69,7 @@ export {
SpinnerTypes,
AccordionGroupCustomEvent,
AccordionGroupChangeEventDetail,
BaseComponentsConfig,
BreadcrumbCustomEvent,
BreadcrumbCollapsedClickEventDetail,
ActionSheetOptions,
@ -87,6 +88,7 @@ export {
ItemReorderEventDetail,
ItemReorderCustomEvent,
ItemSlidingCustomEvent,
IonicConfig,
IonicSafeString,
LoadingOptions,
MenuCustomEvent,

View File

@ -9,7 +9,7 @@ export { initialize } from './global/ionic-global';
export { componentOnReady } from './utils/helpers';
export { isPlatform, Platforms, PlatformConfig, getPlatforms } from './utils/platform';
export { IonicSafeString } from './utils/sanitization';
export { IonicConfig, getMode, setupConfig } from './utils/config';
export { IonicConfig, BaseComponentsConfig, getMode, setupConfig } from './utils/config';
export {
LIFECYCLE_WILL_ENTER,
LIFECYCLE_DID_ENTER,

View File

@ -2,6 +2,26 @@ import type { AnimationBuilder, Mode, SpinnerTypes, TabButtonLayout } from '../i
import type { PlatformConfig } from './platform';
export interface BaseComponentsConfig {
/**
* If provided, the specified components
* will be opted-in to base components. All
* other components will not be opted in.
* Developers should use either `includeComponent`
* or `excludeComponents` but not both.
*/
includeComponents?: string[];
/**
* If provided, the specified components
* will not be opted-in to base components. All
* other components will be opted in.
* Developers should use either `includeComponent`
* or `excludeComponents` but not both.
*/
excludeComponents?: string[];
}
export interface IonicConfig {
/**
* When it's set to `false`, disables all animation and transition across the app.
@ -182,6 +202,17 @@ export interface IonicConfig {
*/
platform?: PlatformConfig;
/**
* When `true`, all components will be rendered without
* iOS or MD styles, providing only the structural styles.
* When `false`, all components will be rendered with iOS or
* MD styles.
* Developers can provide a BaseComponentsConfig object for more
* granularity.
* Defaults to `undefined` which has the same behavior as `false`.
*/
baseComponents?: boolean | BaseComponentsConfig;
// PRIVATE configs
keyboardHeight?: number;
inputShims?: boolean;

View File

@ -27,6 +27,8 @@ export {
AccordionGroupCustomEvent,
AccordionGroupChangeEventDetail,
BaseComponentsConfig,
BreadcrumbCustomEvent,
BreadcrumbCollapsedClickEventDetail,
@ -55,6 +57,7 @@ export {
ItemSlidingCustomEvent,
IonicConfig,
IonicSafeString,
LoadingOptions,
@ -70,6 +73,8 @@ export {
PickerColumn,
PickerColumnOption,
PlatformConfig,
PopoverOptions,
RadioGroupCustomEvent,

View File

@ -61,6 +61,8 @@ export {
AccordionGroupCustomEvent,
AccordionGroupChangeEventDetail,
BaseComponentsConfig,
BreadcrumbCustomEvent,
BreadcrumbCollapsedClickEventDetail,
@ -89,6 +91,7 @@ export {
ItemSlidingCustomEvent,
IonicConfig,
IonicSafeString,
LoadingOptions,