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

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

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

Loading…
Cancel
Save