mg-library 1.0.538 → 1.0.539
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/.expo/README.md +17 -0
- package/components.js +23 -0
- package/package.json +1 -1
package/.expo/README.md
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
> Why do I have a folder named ".expo" in my project?
|
2
|
+
|
3
|
+
The ".expo" folder is created when an Expo project is started using "expo start" command.
|
4
|
+
|
5
|
+
> What does the "packager-info.json" file contain?
|
6
|
+
|
7
|
+
The "packager-info.json" file contains port numbers and process PIDs that are used to serve the application to the mobile device/simulator.
|
8
|
+
|
9
|
+
> What does the "settings.json" file contain?
|
10
|
+
|
11
|
+
The "settings.json" file contains the server configuration that is used to serve the application manifest.
|
12
|
+
|
13
|
+
> Should I commit the ".expo" folder?
|
14
|
+
|
15
|
+
No, you should not share the ".expo" folder. It does not contain any information that is relevant for other developers working on the project, it is specific to your machine.
|
16
|
+
|
17
|
+
Upon project creation, the ".expo" folder is already added to your ".gitignore" file.
|
package/components.js
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { Text } from 'native-base';
|
3
|
+
|
4
|
+
const categoryMap = {
|
5
|
+
h1: { fontSize: '4xl', fontWeight: 'bold' },
|
6
|
+
h2: { fontSize: '3xl', fontWeight: 'bold' },
|
7
|
+
h3: { fontSize: '2xl', fontWeight: 'bold' },
|
8
|
+
h4: { fontSize: 'xl', fontWeight: 'semibold' },
|
9
|
+
h5: { fontSize: 'lg', fontWeight: 'semibold' },
|
10
|
+
h6: { fontSize: 'md', fontWeight: 'semibold' },
|
11
|
+
s1: { fontSize: 'md', fontWeight: 'medium' },
|
12
|
+
s2: { fontSize: 'sm', fontWeight: 'medium' },
|
13
|
+
p1: { fontSize: 'md', fontWeight: 'normal' },
|
14
|
+
p2: { fontSize: 'sm', fontWeight: 'normal' },
|
15
|
+
label: { fontSize: 'sm', fontWeight: 'medium' },
|
16
|
+
c1: { fontSize: 'xs', color: 'gray.500' },
|
17
|
+
c2: { fontSize: '2xs', color: 'gray.500' },
|
18
|
+
};
|
19
|
+
|
20
|
+
export default function MGText({ category = 'p1', style, ...props }) {
|
21
|
+
const styleProps = categoryMap[category] || categoryMap.p1;
|
22
|
+
return <Text {...styleProps} {...props} style={style} />;
|
23
|
+
}
|