master
mahdi 3 years ago
parent a3ae1a515c
commit 3bb02a2ba0
  1. 2
      src/components/productDesign/ProductDesign.js
  2. 12
      src/components/starRating/StarRating.js
  3. 2
      src/components/vodProductDesign/VodProductDesign.js

@ -161,7 +161,7 @@ const ProductDesign = ({
<div className="px-2"> <div className="px-2">
<div className="mt-4"> <div className="mt-4">
<h2 <h2
className={`leading-4 text-base ${productTitleColor} ${productTitleAlignment}`} className={`leading-4 text-base font-semibold ${productTitleColor} ${productTitleAlignment}`}
> >
نسخه چاپی علموم تجربه هفتم نسخه چاپی علموم تجربه هفتم
</h2> </h2>

@ -2,8 +2,8 @@ import React, { useState } from "react";
import "./StarRating.scss"; import "./StarRating.scss";
const StarRating = () => { const StarRating = () => {
const [rating, setRating] = useState(0); const [rating, setRating] = useState(5);
const [hover, setHover] = useState(0); // const [hover, setHover] = useState(5);
return ( return (
<div className="star-rating"> <div className="star-rating">
{[...Array(5)].map((star, index) => { {[...Array(5)].map((star, index) => {
@ -12,12 +12,12 @@ const StarRating = () => {
<button <button
type="button" type="button"
key={index} key={index}
className={index <= (hover || rating) ? "on" : "off"} className={index <= rating ? "on" : "off"}
onClick={() => setRating(index)} onClick={() => setRating(index)}
onMouseEnter={() => setHover(index)} // onMouseEnter={() => setHover(index)}
onMouseLeave={() => setHover(rating)} // onMouseLeave={() => setHover(rating)}
> >
<span className="star text-lg">&#9733;</span> <span className="star text-2xl">&#9733;</span>
</button> </button>
); );
})} })}

@ -145,7 +145,7 @@ const VodProductDesign = ({
className={`flex ${productTitleCategoryHolder} ${productTitleCategoryHolderAlignment} justify-between `} className={`flex ${productTitleCategoryHolder} ${productTitleCategoryHolderAlignment} justify-between `}
> >
<h2 <h2
className={`leading-4 text-base mb-2 ${productTitleColor} ${productTitleAlignment}`} className={`leading-4 text-base mb-2 font-semibold ${productTitleColor} ${productTitleAlignment}`}
> >
نسخه چاپی علموم تجربه هفتم نسخه چاپی علموم تجربه هفتم
</h2> </h2>

Loading…
Cancel
Save