@hoddy-ui/core 1.0.47 → 1.0.48

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.47",
3
+ "version": "1.0.48",
4
4
  "description": "Core rich react native components written in typescript",
5
5
  "main": "index.ts",
6
6
  "repository": {
@@ -80,7 +80,7 @@ export const RatingInput: FC<RatingInputProps> = ({
80
80
 
81
81
  const onSubmit = async () => {
82
82
  setLoading(true);
83
- await _onSubmit({ rating: rate, review });
83
+ _onSubmit && (await _onSubmit({ rating: rate, review }));
84
84
  setLoading(false);
85
85
  };
86
86
  return (
package/src/types.ts CHANGED
@@ -300,7 +300,7 @@ export interface RatingStarsProps {
300
300
  }
301
301
 
302
302
  export interface RatingInputProps {
303
- rating: number;
304
- size: number;
305
- onSubmit: (data: { rating: number; review: string }) => Promise<void>;
303
+ rating?: number;
304
+ size?: number;
305
+ onSubmit?: (data: { rating: number; review: string }) => Promise<void>;
306
306
  }