mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-17 10:41:13 +08:00
feat(react): add initial react code. (#16748)
This commit is contained in:
@ -1,3 +1,26 @@
|
||||
export { Delegate } from './react-framework-delegate';
|
||||
export * from './apis/apis';
|
||||
export * from './utils/wc-shim';
|
||||
import { addIcons } from 'ionicons';
|
||||
import { ICON_PATHS } from 'ionicons/icons';
|
||||
import { IonicConfig } from '@ionic/core';
|
||||
import { defineCustomElements } from '@ionic/core/loader';
|
||||
|
||||
export * from './components';
|
||||
|
||||
export interface IonicGlobal {
|
||||
config?: any;
|
||||
ael?: (elm: any, eventName: string, cb: (ev: Event) => void, opts: any) => void;
|
||||
raf?: (ts: number) => void;
|
||||
rel?: (elm: any, eventName: string, cb: (ev: Event) => void, opts: any) => void;
|
||||
}
|
||||
|
||||
export interface IonicWindow extends Window {
|
||||
Ionic: IonicGlobal;
|
||||
}
|
||||
|
||||
export function registerIonic(config: IonicConfig = {}) {
|
||||
const win: IonicWindow = window as any;
|
||||
const Ionic = (win.Ionic = win.Ionic || {});
|
||||
addIcons(ICON_PATHS);
|
||||
|
||||
Ionic.config = config;
|
||||
defineCustomElements(window);
|
||||
}
|
||||
|
Reference in New Issue
Block a user