Browse Source

add files property (demo.css) to demo

iou90 6 years ago
parent
commit
3910c92601

+ 6
- 0
demo/App.js View File

102
           style={{
102
           style={{
103
             marginTop: 15
103
             marginTop: 15
104
           }}
104
           }}
105
+          enableBaseUrl
106
+          files={[{
107
+            href: 'demo.css',
108
+            type: 'text/css',
109
+            rel: 'stylesheet'
110
+          }]}
105
           customStyle={widthStyle}
111
           customStyle={widthStyle}
106
           onError={() => console.log('width on error')}
112
           onError={() => console.log('width on error')}
107
           onLoad={() => console.log('width on load')}
113
           onLoad={() => console.log('width on load')}

+ 3
- 0
demo/android/app/src/main/assets/web/demo.css View File

1
+.localStyle {
2
+    font-weight: bold;
3
+}

+ 1
- 1
demo/config.js View File

36
 <head>
36
 <head>
37
   <meta name="viewport" content="target-densitydpi=device-dpi, initial-scale=1.0, user-scalable=no" />
37
   <meta name="viewport" content="target-densitydpi=device-dpi, initial-scale=1.0, user-scalable=no" />
38
 </head>
38
 </head>
39
-<p style="display: inline;background-color: transparent !important;background-image: linear-gradient(to bottom, rgba(146, 249, 190, 1), rgba(146, 249, 190, 1));font-weight: 400;font-style: normal;zoom:1;font-size: 21px;line-height: 1.58;letter-spacing: -.003em;">hey</p>
39
+<p class="localStyle" style="display: inline;background-color: transparent !important;background-image: linear-gradient(to bottom, rgba(146, 249, 190, 1), rgba(146, 249, 190, 1));font-style: normal;zoom:1;font-size: 21px;line-height: 1.58;letter-spacing: -.003em;">hey</p>
40
 </html>
40
 </html>
41
 `;
41
 `;
42
 
42
 

+ 12
- 0
demo/ios/demo.xcodeproj/project.pbxproj View File

38
 		5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
38
 		5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
39
 		832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
39
 		832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
40
 		ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; };
40
 		ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; };
41
+		B7420B85210E3185007509B0 /* demo.css in Resources */ = {isa = PBXBuildFile; fileRef = B7420B84210E3185007509B0 /* demo.css */; };
41
 /* End PBXBuildFile section */
42
 /* End PBXBuildFile section */
42
 
43
 
43
 /* Begin PBXContainerItemProxy section */
44
 /* Begin PBXContainerItemProxy section */
343
 		78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
344
 		78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
344
 		832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
345
 		832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
345
 		ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = "<group>"; };
346
 		ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = "<group>"; };
347
+		B7420B84210E3185007509B0 /* demo.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = demo.css; sourceTree = "<group>"; };
346
 /* End PBXFileReference section */
348
 /* End PBXFileReference section */
347
 
349
 
348
 /* Begin PBXFrameworksBuildPhase section */
350
 /* Begin PBXFrameworksBuildPhase section */
482
 		13B07FAE1A68108700A75B9A /* demo */ = {
484
 		13B07FAE1A68108700A75B9A /* demo */ = {
483
 			isa = PBXGroup;
485
 			isa = PBXGroup;
484
 			children = (
486
 			children = (
487
+				B7420B5E210E3082007509B0 /* web */,
485
 				008F07F21AC5B25A0029DE68 /* main.jsbundle */,
488
 				008F07F21AC5B25A0029DE68 /* main.jsbundle */,
486
 				13B07FAF1A68108700A75B9A /* AppDelegate.h */,
489
 				13B07FAF1A68108700A75B9A /* AppDelegate.h */,
487
 				13B07FB01A68108700A75B9A /* AppDelegate.m */,
490
 				13B07FB01A68108700A75B9A /* AppDelegate.m */,
604
 			name = Products;
607
 			name = Products;
605
 			sourceTree = "<group>";
608
 			sourceTree = "<group>";
606
 		};
609
 		};
610
+		B7420B5E210E3082007509B0 /* web */ = {
611
+			isa = PBXGroup;
612
+			children = (
613
+				B7420B84210E3185007509B0 /* demo.css */,
614
+			);
615
+			path = web;
616
+			sourceTree = "<group>";
617
+		};
607
 /* End PBXGroup section */
618
 /* End PBXGroup section */
608
 
619
 
609
 /* Begin PBXNativeTarget section */
620
 /* Begin PBXNativeTarget section */
1050
 			files = (
1061
 			files = (
1051
 				13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
1062
 				13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
1052
 				13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
1063
 				13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
1064
+				B7420B85210E3185007509B0 /* demo.css in Resources */,
1053
 			);
1065
 			);
1054
 			runOnlyForDeploymentPostprocessing = 0;
1066
 			runOnlyForDeploymentPostprocessing = 0;
1055
 		};
1067
 		};

+ 3
- 0
demo/ios/web/demo.css View File

1
+.localStyle {
2
+    font-weight: bold;
3
+}

+ 5349
- 0
demo/yarn.lock
File diff suppressed because it is too large
View File


+ 1
- 1
package-lock.json View File

1
 {
1
 {
2
   "name": "react-native-autoheight-webview",
2
   "name": "react-native-autoheight-webview",
3
-  "version": "0.6.1",
3
+  "version": "0.10.0",
4
   "lockfileVersion": 1,
4
   "lockfileVersion": 1,
5
   "requires": true,
5
   "requires": true,
6
   "dependencies": {
6
   "dependencies": {