|
|
|
@ -1,4 +1,4 @@ |
|
|
|
|
import React from "react"; |
|
|
|
|
import React, { useEffect, useState } from "react"; |
|
|
|
|
|
|
|
|
|
import StarRating from "../starRating/StarRating"; |
|
|
|
|
import ReactTooltip from "react-tooltip"; |
|
|
|
@ -47,6 +47,12 @@ const VodProductDesign = ({ |
|
|
|
|
rangeWidth, |
|
|
|
|
playBtnBgColor, |
|
|
|
|
}) => { |
|
|
|
|
const [progressFlag, setProgressFlag] = useState(false); |
|
|
|
|
useEffect(() => { |
|
|
|
|
setTimeout(() => { |
|
|
|
|
setProgressFlag(true); |
|
|
|
|
}, 500); |
|
|
|
|
}); |
|
|
|
|
return ( |
|
|
|
|
<section className="w-3/6 mx-auto p-4 bg-white rounded-md shadow-md my-8"> |
|
|
|
|
{/* title holder */} |
|
|
|
@ -237,7 +243,10 @@ const VodProductDesign = ({ |
|
|
|
|
{rangeHolder && ( |
|
|
|
|
<div className="bg-rangeBgColor h-3 w-full rounded mt-2"> |
|
|
|
|
<div |
|
|
|
|
className={`bg-rangeFillBgColor h-3 rounded ${rangeWidth}`} |
|
|
|
|
className={`bg-rangeFillBgColor h-3 rounded duration-300`} |
|
|
|
|
style={{ |
|
|
|
|
width: progressFlag ? rangeWidth : 0, |
|
|
|
|
}} |
|
|
|
|
></div> |
|
|
|
|
</div> |
|
|
|
|
)} |
|
|
|
@ -294,7 +303,7 @@ VodProductDesign.defaultProps = { |
|
|
|
|
productTitleAlignment: "text-justify", |
|
|
|
|
|
|
|
|
|
// برای درصد دادن به عرض رنج
|
|
|
|
|
rangeWidth: "w-44", |
|
|
|
|
rangeWidth: "75%", |
|
|
|
|
|
|
|
|
|
//دی ای وی که محصول داخلش است میتونیم بهش بوردر بدیم
|
|
|
|
|
productHolderBorder: "border", |
|
|
|
|