diff options
author | HombreLaser <sebastian-440@live.com> | 2023-04-26 21:37:38 -0600 |
---|---|---|
committer | HombreLaser <sebastian-440@live.com> | 2023-04-26 21:37:38 -0600 |
commit | c7e493ce3d2855e61787d86714625bc7fc51f9bd (patch) | |
tree | b7b9b97fbe26d6258a553c8dc4655d5fcf7cdb92 /src/components/review.tsx | |
parent | 70db52d02dfe5da7397e5ba801b01739a5d0ceaa (diff) |
Añade vista de producto individual
Diffstat (limited to 'src/components/review.tsx')
-rw-r--r-- | src/components/review.tsx | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/components/review.tsx b/src/components/review.tsx new file mode 100644 index 0000000..e3f34df --- /dev/null +++ b/src/components/review.tsx @@ -0,0 +1,30 @@ +import { PersonCircle, StarFill } from "react-bootstrap-icons"; + +export default function Review({ review }) { + const rating = [...Array(review.attributes.rating)].map((value: undefined, index: number) => + <StarFill size={12} color="rgb(156 163 175)"/> + ); + + return( + <> + <div className="grid grid-cols-10 w-3/5 my-4"> + <div className="flex flex-col col-span- justify-center mx-2"> + <div> + {review.attributes.author_name} + </div> + <div> + <PersonCircle size={32} color="rgb(156 163 175)"/> + </div> + <div className="flex inline-flex my-2"> + {rating} + </div> + </div> + <div className="flex col-span-8 justify-start"> + <div className="border-solid border-2 border-gray-200"> + {review.attributes.review} + </div> + </div> + </div> + </> + ); +}
\ No newline at end of file |