@hero-design/rn 7.1.3-alpha8 → 7.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "7.1.3-alpha8",
3
+ "version": "7.2.0",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -20,7 +20,7 @@
20
20
  "dependencies": {
21
21
  "@emotion/native": "^11.9.3",
22
22
  "@emotion/react": "^11.9.3",
23
- "@hero-design/colors": "7.1.2"
23
+ "@hero-design/colors": "7.2.0"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "react": "17.0.2",
@@ -6,8 +6,15 @@ import {
6
6
  NativeStackScreenProps,
7
7
  } from '@react-navigation/native-stack';
8
8
  import { useFonts } from 'expo-font';
9
- import { SafeAreaView, FlatList } from 'react-native';
10
- import { ThemeProvider, theme, useTheme, Typography } from '../src/index';
9
+ import { SafeAreaView, FlatList, View, TouchableOpacity } from 'react-native';
10
+ import {
11
+ ThemeProvider,
12
+ theme,
13
+ useTheme,
14
+ Typography,
15
+ Icon,
16
+ Divider,
17
+ } from '../src/index';
11
18
  import BadgePlayground from './components/Badge';
12
19
  import BottomNavigation from './components/BottomNavigation';
13
20
  import Button from './components/Button';
@@ -52,44 +59,45 @@ const components = [
52
59
  { name: 'Typography', component: TypographyPlayground },
53
60
  ] as const;
54
61
 
55
- const ComponentItem = ({
56
- name,
57
- onPress,
58
- }: {
59
- name: string;
60
- onPress: () => void;
61
- }) => {
62
+ const ComponentItem = ({ name }: { name: string }) => {
62
63
  const hdTheme = useTheme();
63
64
  return (
64
- <Typography.Text
65
- fontSize="large"
66
- onPress={onPress}
65
+ <View
67
66
  style={{
68
- marginTop: hdTheme.space.medium,
67
+ flex: 1,
68
+ flexDirection: 'row',
69
+ alignItems: 'center',
70
+ justifyContent: 'space-between',
71
+ marginHorizontal: hdTheme.space.medium,
72
+ marginVertical: hdTheme.space.medium,
69
73
  }}
70
74
  >
71
- {name}
72
- </Typography.Text>
73
- );
74
- };
75
-
76
- const ComponentList = ({ navigation }: Navigation) => {
77
- const hdTheme = useTheme();
78
- return (
79
- <SafeAreaView style={{ marginHorizontal: hdTheme.space.large }}>
80
- <FlatList
81
- data={components}
82
- renderItem={({ item }) => (
83
- <ComponentItem
84
- name={item.name}
85
- onPress={() => navigation.navigate(item.name)}
86
- />
87
- )}
75
+ <Typography.Text fontSize="large">{name}</Typography.Text>
76
+ <Icon
77
+ icon="arrow-right"
78
+ size="small"
79
+ style={{ color: hdTheme.colors.disabledText }}
88
80
  />
89
- </SafeAreaView>
81
+ </View>
90
82
  );
91
83
  };
92
84
 
85
+ const ComponentList = ({ navigation }: Navigation) => (
86
+ <SafeAreaView>
87
+ <FlatList
88
+ data={components}
89
+ renderItem={({ item }) => (
90
+ <>
91
+ <TouchableOpacity onPress={() => navigation.navigate(item.name)}>
92
+ <ComponentItem name={item.name} />
93
+ </TouchableOpacity>
94
+ <Divider marginHorizontal="small" />
95
+ </>
96
+ )}
97
+ />
98
+ </SafeAreaView>
99
+ );
100
+
93
101
  const App = () => {
94
102
  const CustomNavigationTheme = {
95
103
  ...DefaultTheme,
package/.expo/README.md DELETED
@@ -1,15 +0,0 @@
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 do the files contain?
6
-
7
- - "devices.json": contains information about devices that have recently opened this project. This is used to populate the "Development sessions" list in your development builds.
8
- - "packager-info.json": contains port numbers and process PIDs that are used to serve the application to the mobile device/simulator.
9
- - "settings.json": contains the server configuration that is used to serve the application manifest.
10
-
11
- > Should I commit the ".expo" folder?
12
-
13
- 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.
14
-
15
- Upon project creation, the ".expo" folder is already added to your ".gitignore" file.
@@ -1,10 +0,0 @@
1
- {
2
- "devToolsPort": 19002,
3
- "expoServerPort": null,
4
- "packagerPort": 19000,
5
- "packagerPid": null,
6
- "expoServerNgrokUrl": null,
7
- "packagerNgrokUrl": null,
8
- "ngrokPid": null,
9
- "webpackServerPort": null
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "hostType": "lan",
3
- "lanType": "ip",
4
- "dev": true,
5
- "minify": false,
6
- "urlRandomness": null,
7
- "https": false,
8
- "scheme": null,
9
- "devClient": false
10
- }