You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
757 B

  1. import { StarIcon } from "@heroicons/react/24/solid";
  2. import React, { FC } from "react";
  3. export interface StartRatingProps {
  4. className?: string;
  5. point?: number;
  6. reviewCount?: number;
  7. }
  8. const StartRating: FC<StartRatingProps> = ({
  9. className = "",
  10. point = 4.5,
  11. reviewCount = 112,
  12. }) => {
  13. return (
  14. <div
  15. className={`nc-StartRating flex items-center space-x-1 text-sm ${className}`}
  16. data-nc-id="StartRating"
  17. >
  18. <div className="pb-[2px]">
  19. <StarIcon className="w-[18px] h-[18px] text-orange-500" />
  20. </div>
  21. <span className="font-medium ">{point}</span>
  22. <span className="text-neutral-500 dark:text-neutral-400">
  23. ({reviewCount})
  24. </span>
  25. </div>
  26. );
  27. };
  28. export default StartRating;