@popp0102/nova 0.2.1 → 0.2.3

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,21 @@
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
+ color = 'white',
10
+ backgroundColor = 'blue',
11
+ style
12
+ }) {
5
13
  return (
6
14
  <View style={style}>
7
- <View style={styles.container}>
8
- <Ionicons name="checkmark-circle" color="white" size={20} />
9
- <Text style={styles.text}>{children}</Text>
15
+ <View style={[styles.container, { backgroundColor }]}>
16
+ {leftIcon && <MaterialIcons name={leftIcon} size={iconSize} color={color} />}
17
+ <Text style={[styles.text, { color }]}>{children}</Text>
18
+ {rightIcon && <MaterialIcons name={rightIcon} size={iconSize} color={color} />}
10
19
  </View>
11
20
  </View>
12
21
  );
@@ -19,11 +28,9 @@ const styles = StyleSheet.create({
19
28
  gap: 4,
20
29
  padding: 8,
21
30
  borderRadius: 24,
22
- backgroundColor: "blue",
23
31
  alignSelf: "flex-start",
24
32
  },
25
33
  text: {
26
- color: "white",
27
34
  fontSize: 16,
28
35
  },
29
36
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@popp0102/nova",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "React Native component library",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.js",
@@ -30,10 +30,10 @@
30
30
  "prepublishOnly": "npm run lint && npm run test"
31
31
  },
32
32
  "peerDependencies": {
33
- "@expo/vector-icons": "*",
34
33
  "react": ">=18.0.0",
35
34
  "react-native": ">=0.70.0",
36
- "react-native-safe-area-context": ">=4.0.0"
35
+ "react-native-safe-area-context": ">=4.0.0",
36
+ "@expo/vector-icons": ">=14.0.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@babel/core": "^7.24.0",