mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 03:00:58 +08:00

* refactor(ionicons): update to ionicons v5 * refactor(back-button): update back button icon to v5 ionicons * refactor(item): update default detail icon to chevron-forward * refactor(reorder): update reorder icon for ionicons v5 * refactor(searchbar): use search-sharp * refactor(searchIcon): update v5 ionicon * refactor(clearIcon): update searchbar clear icon * refactor(cancelButton): update to arrow-back-sharp * refactor(menuIcon): update to v5 ionicons * api readme updates * update react and vue ionicons * add ionicons to react deps * add ionicons to ionic/vue deps * add icon to react test * updates * fix back button regression for no icon * update tests * fix more tests * fix more icons * update ionicons version * fix circle icons * add correct ellipsis
37 lines
1.3 KiB
TypeScript
37 lines
1.3 KiB
TypeScript
// Core Ionic types
|
|
// tslint:disable-next-line:no-import-side-effect
|
|
import { IonicConfig } from '@ionic/core';
|
|
|
|
// Webpack import for ionicons
|
|
import { addIcons } from 'ionicons';
|
|
import { arrowBackSharp, chevronBack, chevronForward, closeCircle, closeSharp, menuOutline, menuSharp, reorderThreeOutline, reorderTwoSharp, searchOutline, searchSharp } from 'ionicons/icons';
|
|
|
|
// import '@ionic/core/css/ionic.bundle.css';
|
|
// import 'ionicons/dist/collection/icon/icon.css';
|
|
|
|
import { applyPolyfills, defineCustomElements } from '@ionic/core/loader';
|
|
import { IonicWindow } from './interfaces';
|
|
|
|
export function appInitialize(config?: IonicConfig) {
|
|
const win: IonicWindow = window as any;
|
|
const Ionic = (win.Ionic = win.Ionic || {});
|
|
|
|
Ionic.config = config;
|
|
applyPolyfills().then(() => defineCustomElements(win));
|
|
|
|
// Icons that are used by internal components
|
|
addIcons({
|
|
'arrow-back-sharp': arrowBackSharp,
|
|
'chevron-back': chevronBack,
|
|
'chevron-forward': chevronForward,
|
|
'close-circle': closeCircle,
|
|
'close-sharp': closeSharp,
|
|
'menu-outline': menuOutline,
|
|
'menu-sharp': menuSharp,
|
|
'reorder-two-sharp': reorderTwoSharp,
|
|
'reorder-three-outline': reorderThreeOutline,
|
|
'search-outline': searchOutline,
|
|
'search-sharp': searchSharp,
|
|
});
|
|
}
|