@popp0102/nova 0.2.0 → 0.2.2

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.
@@ -1,12 +1,20 @@
1
1
  import { View, Text, StyleSheet } from 'react-native';
2
- import { Ionicons } from '@expo/vector-icons';
2
+ import { MaterialIcons } from '@expo/vector-icons';
3
3
 
4
- export default function Badge({ children, style }) {
4
+ export default function Badge({
5
+ children,
6
+ leftIcon,
7
+ rightIcon,
8
+ iconSize = 20,
9
+ iconColor = 'white',
10
+ style
11
+ }) {
5
12
  return (
6
13
  <View style={style}>
7
14
  <View style={styles.container}>
8
- <Ionicons name="checkmark-circle" color="white" size={20} />
15
+ {leftIcon && <MaterialIcons name={leftIcon} size={iconSize} color={iconColor} />}
9
16
  <Text style={styles.text}>{children}</Text>
17
+ {rightIcon && <MaterialIcons name={rightIcon} size={iconSize} color={iconColor} />}
10
18
  </View>
11
19
  </View>
12
20
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@popp0102/nova",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "React Native component library",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.js",
@@ -32,7 +32,8 @@
32
32
  "peerDependencies": {
33
33
  "react": ">=18.0.0",
34
34
  "react-native": ">=0.70.0",
35
- "react-native-safe-area-context": ">=4.0.0"
35
+ "react-native-safe-area-context": ">=4.0.0",
36
+ "@expo/vector-icons": ">=14.0.0"
36
37
  },
37
38
  "devDependencies": {
38
39
  "@babel/core": "^7.24.0",
@@ -50,6 +51,5 @@
50
51
  "react-test-renderer": "^18.3.1"
51
52
  },
52
53
  "dependencies": {
53
- "@expo/vector-icons": "^15.0.3"
54
54
  }
55
55
  }