perf(various): don't use lazy-loaded icon names in components (#24671)

This commit is contained in:
Amanda Smith
2022-01-28 09:13:39 -06:00
committed by GitHub
parent bdb5c421d2
commit 484de5074d
16 changed files with 78 additions and 125 deletions

View File

@ -1,21 +1,4 @@
import { IonicConfig, initialize } from '@ionic/core/components';
import { addIcons } from 'ionicons';
import {
arrowBackSharp,
caretBackSharp,
chevronBack,
chevronDown,
chevronForward,
close,
closeCircle,
closeSharp,
menuOutline,
menuSharp,
reorderThreeOutline,
reorderTwoSharp,
searchOutline,
searchSharp,
} from 'ionicons/icons';
export {
// UTILS
@ -171,24 +154,6 @@ export { useIonPopover, UseIonPopoverResult } from '../hooks/useIonPopover';
export { useIonPicker, UseIonPickerResult } from '../hooks/useIonPicker';
export { useIonLoading, UseIonLoadingResult } from '../hooks/useIonLoading';
// Icons that are used by internal components
addIcons({
'arrow-back-sharp': arrowBackSharp,
'caret-back-sharp': caretBackSharp,
'chevron-back': chevronBack,
'chevron-down': chevronDown,
'chevron-forward': chevronForward,
close,
'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,
});
export const setupIonicReact = (config: IonicConfig = {}) => {
/**
* By default Ionic Framework hides elements that