-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.web.js
More file actions
27 lines (24 loc) · 781 Bytes
/
index.web.js
File metadata and controls
27 lines (24 loc) · 781 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import React from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
} from 'react-native';
import App from "./App/index"
import iconfont from 'fonts/iconfont.ttf';
console.log("iconfont",iconfont);
const reactNativeVectorIconsRequiredStyles = "@font-face { src:url(" + iconfont + ");font-family: IconFont; }"
const style = document.createElement('style');
style.type = 'text/css';
if (style.styleSheet){
style.styleSheet.cssText = reactNativeVectorIconsRequiredStyles;
} else {
style.appendChild(document.createTextNode(reactNativeVectorIconsRequiredStyles));
}
// inject stylesheet
document.head.appendChild(style);
AppRegistry.registerComponent('App', () => App);
AppRegistry.runApplication('App', {
rootTag: document.getElementById('app')
});