@expo-google-fonts/dev 0.2.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -10
- package/index.d.ts +2972 -180
- package/index.js +7543 -9318
- package/package.json +10 -4
- package/useFonts.js +3 -4
- package/.prettierrc +0 -8
package/package.json
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo-google-fonts/dev",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Load
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Load 1811 font families from Google Fonts over the network while developing your Expo app",
|
|
5
5
|
"main": "index.js",
|
|
6
|
-
"repository":
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/expo/google-fonts.git",
|
|
9
|
+
"directory": "font-packages/dev"
|
|
10
|
+
},
|
|
7
11
|
"homepage": "https://github.com/expo/google-fonts/tree/master/font-packages/dev#readme",
|
|
8
12
|
"author": "Expo Team <team@expo.io>",
|
|
9
13
|
"license": "MIT",
|
|
10
|
-
"publishConfig": {
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public"
|
|
16
|
+
}
|
|
11
17
|
}
|
package/useFonts.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { useEffect, useState } from 'react';
|
|
2
|
-
|
|
3
1
|
import { loadAsync } from 'expo-font';
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
5
|
* Load a map of custom fonts to use in textual elements.
|
|
@@ -13,8 +12,8 @@ import { loadAsync } from 'expo-font';
|
|
|
13
12
|
* @example const [loaded, error] = useFonts(...);
|
|
14
13
|
*/
|
|
15
14
|
export function useFonts(map) {
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
const [loaded, setLoaded] = useState(false);
|
|
16
|
+
const [error, setError] = useState(null);
|
|
18
17
|
|
|
19
18
|
useEffect(() => {
|
|
20
19
|
loadAsync(map)
|