@hoddy-ui/core 1.0.75 → 1.0.77

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": "@hoddy-ui/core",
3
- "version": "1.0.75",
3
+ "version": "1.0.77",
4
4
  "description": "Core rich react native components written in typescript",
5
5
  "main": "index.ts",
6
6
  "repository": {
@@ -41,6 +41,7 @@ export const RatingStars: FC<RatingStarsProps> = ({
41
41
  export const RatingInput: FC<RatingInputProps> = ({
42
42
  onSubmit: _onSubmit,
43
43
  rating = 0,
44
+ noReview,
44
45
  size = 16,
45
46
  }) => {
46
47
  const [showReviewsModal, setShowReviewsModal] = useState(false);
@@ -56,7 +57,7 @@ export const RatingInput: FC<RatingInputProps> = ({
56
57
  inputCon: {
57
58
  marginBottom: "20@vs",
58
59
  backgroundColor: colors.white[3],
59
- padding: "15@ms",
60
+ padding: "10@ms",
60
61
  borderRadius: 20,
61
62
  },
62
63
  input: {
@@ -73,9 +74,11 @@ export const RatingInput: FC<RatingInputProps> = ({
73
74
  setRate(index + 1);
74
75
  Haptics.selectionAsync();
75
76
 
76
- setTimeout(() => {
77
- setShowReviewsModal(true);
78
- }, 500);
77
+ if (!noReview)
78
+ setTimeout(() => {
79
+ setShowReviewsModal(true);
80
+ }, 500);
81
+ else onSubmit();
79
82
  };
80
83
 
81
84
  const onSubmit = async () => {
@@ -132,6 +135,7 @@ export const RatingInput: FC<RatingInputProps> = ({
132
135
  <TextInput
133
136
  style={styles.input}
134
137
  multiline
138
+ placeholderTextColor={colors.textSecondary.main}
135
139
  value={review}
136
140
  onChangeText={(text) => setReview(text)}
137
141
  placeholder="Type review here.."
package/src/types.ts CHANGED
@@ -306,6 +306,7 @@ export interface RatingStarsProps {
306
306
 
307
307
  export interface RatingInputProps {
308
308
  rating?: number;
309
+ noReview?: boolean;
309
310
  size?: number;
310
311
  onSubmit?: (data: { rating: number; review: string }) => Promise<void>;
311
312
  }