delete 5 files and update 1 file

master
mahdi 3 years ago
parent 069093b774
commit dff50a1c50
  1. 0
      public/images/ProductSalesDesign1home-trend-down.svg
  2. 0
      public/images/ProductSalesDesign1home-trend-up.svg
  3. 0
      public/images/ProductSalesDesign2Ellipse.svg
  4. 6
      src/components/ProductSalesAmount/ProductSalesDesign1/index.js
  5. 6
      src/components/ProductSalesAmount/ProductSalesDesign2/index.js
  6. 27
      src/components/ProductSalesAmount/index.js
  7. 11
      src/redux/data.js

Before

Width:  |  Height:  |  Size: 182 B

After

Width:  |  Height:  |  Size: 182 B

@ -4,7 +4,7 @@ import TitleSubtitle from "../../TitleSubtitle";
import arrowDown from "./home-trend-down.svg"; import arrowDown from "./home-trend-down.svg";
import arrowUp from "./home-trend-up.svg"; import arrowUp from "./home-trend-up.svg";
const Design1 = ({ title, price, incomes }) => { const ProductSalesDesign1 = ({ title, price, incomes }) => {
return ( return (
<div className="bg-white rounded shadow mx-auto p-5"> <div className="bg-white rounded shadow mx-auto p-5">
{/* title */} {/* title */}
@ -46,9 +46,9 @@ const Design1 = ({ title, price, incomes }) => {
); );
}; };
export default Design1; export default ProductSalesDesign1;
Design1.defaultProps = { ProductSalesDesign1.defaultProps = {
title: "میزان فروش محصولات", title: "میزان فروش محصولات",
price: "196.209.810", price: "196.209.810",

@ -4,7 +4,7 @@ import TitleSubtitle from "../../TitleSubtitle";
import ellipse from "./Ellipse.svg"; import ellipse from "./Ellipse.svg";
const Design2 = ({ incomes }) => { const ProductSalesDesign2 = ({ incomes }) => {
return ( return (
<div className="bg-white rounded shadow mx-auto py-7 px-4"> <div className="bg-white rounded shadow mx-auto py-7 px-4">
{/* title */} {/* title */}
@ -25,9 +25,9 @@ const Design2 = ({ incomes }) => {
); );
}; };
export default Design2; export default ProductSalesDesign2;
Design2.defaultProps = { ProductSalesDesign2.defaultProps = {
incomes: [ incomes: [
{ {
image: ellipse, image: ellipse,

@ -0,0 +1,27 @@
import React, { useState } from "react";
import ProductSalesDesign1 from "./ProductSalesDesign1";
import ProductSalesDesign2 from "./ProductSalesDesign2";
function ProductSalesAmount() {
const list = {
1: <ProductSalesDesign1 />,
1: <ProductSalesDesign2 />,
};
const [type, setType] = useState(1);
return (
<div className="w-full flex flex-col items-center">
<select
className="mb-10 w-20 bg-gray-200"
onChange={(e) => setType(e.target.value)}
>
{Object.keys(list).map((option, index) => (
<option key={index}>{option}</option>
))}
</select>
{list[type]}
</div>
);
}
export default ProductSalesAmount;

@ -47,6 +47,7 @@ import FormFields from "../components/FormFields";
import Tabels from "../components/Tabels"; import Tabels from "../components/Tabels";
import LeafletMap from "../components/LeafletMap"; import LeafletMap from "../components/LeafletMap";
import ProductGallery from "../components/ProductGallery"; import ProductGallery from "../components/ProductGallery";
import ProductSalesAmount from "../components/ProductSalesAmount";
// mini components // mini components
import MiniComponents from "../components/MiniComponents"; import MiniComponents from "../components/MiniComponents";
@ -830,6 +831,16 @@ const components = [
code: null, code: null,
}, },
}, },
{
name: "Product Sales Amount",
author: "Andalib",
props: [],
content: {
name: "Product Sales Amount",
component: <ProductSalesAmount />,
code: null,
},
},
// mini components // mini components
{ {
name: "Mini Components", name: "Mini Components",

Loading…
Cancel
Save