Discount Added

temp
Pedram Keshavarzi 3 years ago
parent ba29955cb0
commit 5e3de37ccd
  1. 6
      src/components/Product/index.js
  2. 1
      src/components/SalesContainer/index.js
  3. 2
      src/components/StarRating/index.js

@ -61,10 +61,10 @@ const ProductDesign = ({
{/* product image */}
<div className="w-full relative">
{/* icons on image */}
<div className="absolute left-2 top-2">
<div className="absolute left-0 top-10">
{discountPricePercent && (
<div className="bg-discountPriceBg rounded-md px-2">
<p className="text-discountPriceTitle font-bold text-xs">
<div className="bg-discountPriceBg bg-white w-full p-2 px-3">
<p className="text-discountPriceTitle font-bold text-md text-blueC0">
23<span>%</span>
</p>
</div>

@ -66,6 +66,7 @@ const SalesContainer = ({
productHolderHoverBorder='shadow-md'
big
starRate={Math.floor(Math.random() * 5) + 1}
discountPricePercent
/>
</Link>
))}

@ -1,7 +1,7 @@
import React, { useState } from "react";
import StarRatingComponent from "react-star-rating-component";
function StarRating({rate}) {
function StarRating() {
const [rate, setRating] = useState(2);
return (
<StarRatingComponent

Loading…
Cancel
Save