diff --git a/src/components/CommentListing.tsx b/src/components/CommentListing.tsx new file mode 100644 index 0000000..21d14a0 --- /dev/null +++ b/src/components/CommentListing.tsx @@ -0,0 +1,79 @@ +import { StarIcon } from "@heroicons/react/24/solid"; +import React, { FC } from "react"; +import Avatar from "@/shared/Avatar"; + +interface CommentListingDataType { + name: string; + avatar?: string; + date: string; + comment: string; + starPoint: number; +} + +export interface CommentListingProps { + className?: string; + data?: CommentListingDataType; + hasListingTitle?: boolean; +} + +const DEMO_DATA: CommentListingDataType = { + name: "Cody Fisher", + date: "May 20, 2021", + comment: + "There’s no stopping the tech giant. Apple now opens its 100th store in China.There’s no stopping the tech giant.", + starPoint: 5, +}; + +const CommentListing: FC = ({ + className = "", + data = DEMO_DATA, + hasListingTitle, +}) => { + return ( +
+
+ +
+
+
+
+
+ {data.name} + {hasListingTitle && ( + <> + + {` review in `} + + The Lounge & Bar + + )} +
+ + {data.date} + +
+
+ + + + + +
+
+ + {data.comment} + +
+
+ ); +}; + +export default CommentListing;