From 33c008f2ab640ec4ccd373112de858ae085b45f8 Mon Sep 17 00:00:00 2001 From: John Doe Date: Sun, 10 Sep 2023 17:29:56 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=A6=20Added=20StarRating=20component?= =?UTF-8?q?=20=F0=9F=8C=9F=20Implement=20a=20reusable=20StarRating=20compo?= =?UTF-8?q?nent=20=F0=9F=93=8A=20Set=20default=20props=20for=20point=20and?= =?UTF-8?q?=20reviewCount=20=F0=9F=8E=A8=20Styled=20StarRating=20component?= =?UTF-8?q?=20for=20better=20UI=20=F0=9F=94=A7=20Added=20missing=20export?= =?UTF-8?q?=20statement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/StartRating.tsx | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/components/StartRating.tsx diff --git a/src/components/StartRating.tsx b/src/components/StartRating.tsx new file mode 100644 index 0000000..d090479 --- /dev/null +++ b/src/components/StartRating.tsx @@ -0,0 +1,31 @@ +import { StarIcon } from "@heroicons/react/24/solid"; +import React, { FC } from "react"; + +export interface StartRatingProps { + className?: string; + point?: number; + reviewCount?: number; +} + +const StartRating: FC = ({ + className = "", + point = 4.5, + reviewCount = 112, +}) => { + return ( +
+
+ +
+ {point} + + ({reviewCount}) + +
+ ); +}; + +export default StartRating;