@momo-kits/chip 0.77.5 → 0.77.7

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/types.ts +42 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/chip",
3
- "version": "0.77.5",
3
+ "version": "0.77.7",
4
4
  "private": false,
5
5
  "main": "index.tsx",
6
6
  "dependencies": {},
package/types.ts CHANGED
@@ -1,13 +1,55 @@
1
1
  import {ViewStyle} from 'react-native';
2
2
 
3
+ /**
4
+ * Props for the Chip component. A Chip is a compact element that represents an input, attribute, or action.
5
+ */
3
6
  export type ChipProps = {
7
+ /**
8
+ * The text to be displayed on the chip. This is typically a brief piece of information like a tag.
9
+ */
4
10
  label: string;
11
+
12
+ /**
13
+ * Optional. The name of the icon to be displayed on the left side of the chip's label.
14
+ * If not provided, no icon is rendered on the left.
15
+ */
5
16
  iconLeft?: string;
17
+
18
+ /**
19
+ * Optional. The name of the icon to be displayed on the right side of the chip's label.
20
+ * If not provided, no icon is rendered on the right.
21
+ */
6
22
  iconRight?: string;
23
+
24
+ /**
25
+ * Optional. Indicates whether the chip is selected. A selected chip may have a different style or icon.
26
+ * Defaults to `false` if not provided.
27
+ */
7
28
  selected?: boolean;
29
+
30
+ /**
31
+ * Optional. Custom styles to apply to the Chip component. Can be a single style or an array of styles.
32
+ */
8
33
  style?: ViewStyle | ViewStyle[];
34
+
35
+ /**
36
+ * Optional. A callback function triggered when the chip is pressed. This makes the chip act as a touchable element.
37
+ */
9
38
  onPress?: () => void;
39
+
40
+ /**
41
+ * Optional. Specifies the size of the chip, influencing its padding and font size. Can be 'small' or 'large'.
42
+ * If not provided, a standard size is used.
43
+ */
10
44
  size?: 'small' | 'large';
45
+
46
+ /**
47
+ * Optional. Specifies the color of the left icon. If not provided, a default icon color may be used.
48
+ */
11
49
  iconLeftColor?: string;
50
+
51
+ /**
52
+ * Optional. Specifies the color of the right icon. If not provided, a default icon color may be used.
53
+ */
12
54
  iconRightColor?: string;
13
55
  };