@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 +1 -1
- package/src/Components/StarRating.tsx +8 -4
- package/src/types.ts +1 -0
package/package.json
CHANGED
|
@@ -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: "
|
|
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
|
-
|
|
77
|
-
|
|
78
|
-
|
|
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