build(deps): update package.json, src/components/Rating/index.js and yarn.lock

master
mahdi 3 years ago
parent f2f4b7d732
commit 8aec90b62f
  1. 1
      package.json
  2. 16
      src/components/Rating/StarRating2/index.js
  3. 2
      src/components/Rating/index.js
  4. 16769
      yarn.lock

@ -40,6 +40,7 @@
"react-redux": "^7.2.6", "react-redux": "^7.2.6",
"react-router-dom": "6", "react-router-dom": "6",
"react-scripts": "5.0.0", "react-scripts": "5.0.0",
"react-star-rating-component": "^1.4.1",
"react-table": "^7.7.0", "react-table": "^7.7.0",
"react-tooltip": "^4.2.21", "react-tooltip": "^4.2.21",
"recharts": "^2.1.8", "recharts": "^2.1.8",

@ -0,0 +1,16 @@
import React, { useState } from "react";
import StarRatingComponent from "react-star-rating-component";
function StarRating2() {
const [rate, setRating] = useState(2);
return (
<StarRatingComponent
name="rate1"
starCount={5}
value={rate}
onStarHover={(value) => setRating(value)}
/>
);
}
export default StarRating2;

@ -1,10 +1,12 @@
import React, { useState } from "react"; import React, { useState } from "react";
import StarRating1 from "./StarRating1"; import StarRating1 from "./StarRating1";
import StarRating2 from "./StarRating2";
function Rating() { function Rating() {
const list = { const list = {
1: <StarRating1 />, 1: <StarRating1 />,
2: <StarRating2 />,
}; };
const [type, setType] = useState(1); const [type, setType] = useState(1);
return ( return (

16769
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save