delete 1 file and update 2 files

master
mahdi 2 years ago
parent 37c3f0fba7
commit cdaa678d63
  1. 46
      src/components/ButtonDesign/ButtonNextToEachOther/index.js
  2. 2
      src/components/ButtonDesign/index.js
  3. 73
      src/components/Datepicker/CalenderList/index.js

@ -1,46 +0,0 @@
import React from "react";
import Button from "../Button";
const ButtonNextToEachOther = ({ buttons }) => {
return (
<div className="flex flex-row">
<div className="flex flex-row">
{buttons.map((button, i) => (
<Button
text={button.title}
className={`${button.className} w-16 text-primaryText text-lg border border-primary px-4 py-2`}
/>
))}
</div>
<div className="flex flex-row mr-5">
<Button
text={"امروز"}
className="text-primaryText text-lg border border-primary rounded-sm px-4 py-2"
/>
</div>
</div>
);
};
export default ButtonNextToEachOther;
ButtonNextToEachOther.defaultProps = {
buttons: [
{
title: "روز",
className: "rounded-tr-lg rounded-br-lg",
},
{
title: "هفته",
className: "",
},
{
title: "ماه",
className: "",
},
{
title: "سال",
className: "rounded-tl-lg rounded-bl-lg",
},
],
};

@ -2,13 +2,11 @@ import React, { useState } from "react";
import Button from "./Button"; import Button from "./Button";
import ButtonDivTag from "./ButtonDivTag"; import ButtonDivTag from "./ButtonDivTag";
import ButtonNextToEachOther from "./ButtonNextToEachOther";
function ButtonDesign() { function ButtonDesign() {
const list = { const list = {
1: <Button />, 1: <Button />,
2: <ButtonDivTag />, 2: <ButtonDivTag />,
3: <ButtonNextToEachOther />,
}; };
const [type, setType] = useState(1); const [type, setType] = useState(1);

@ -1,26 +1,69 @@
import React from "react"; import React from "react";
import Calender from "../Calender"; import Calender from "../Calender";
import Button from "../../ButtonDesign/Button/";
const CalenderList = () => { const CalenderList = ({ buttons }) => {
return ( return (
<div className="bg-surface rounded p-4 w-full flex flex-wrap space-between gap-5"> <div className="flex flex-col bg-white">
<Calender /> <div className="w-[96%] mx-auto flex flex-row ">
<Calender /> {/* right side */}
<Calender /> <div className="flex flex-row items-center bg-red-400">
<Calender /> {/* right side */}
<Calender /> <div className="flex flex-row text-primaryText">
<Calender /> <span className="text-sm">خرداد</span>
<Calender /> </div>
<Calender /> {/* left side */}
<Calender /> <div className="flex flex-row">
<Calender /> {buttons.map((button, i) => (
<Calender /> <Button
<Calender /> key={i}
text={button.title}
className={`${button.className} w-14 text-sm text-primaryText border border-primary p-2`}
/>
))}
</div>
</div>
</div>
{/* ? calender list */}
<div className="flex flex-wrap space-between gap-5">
<Calender />
<Calender />
<Calender />
<Calender />
<Calender />
<Calender />
<Calender />
<Calender />
<Calender />
<Calender />
<Calender />
<Calender />
</div>
</div> </div>
); );
}; };
export default CalenderList; export default CalenderList;
CalenderList.defaultProps = {}; CalenderList.defaultProps = {
buttons: [
{
title: "روز",
className: "rounded-tr-lg rounded-br-lg",
},
{
title: "هفته",
className: "",
},
{
title: "ماه",
className: "",
},
{
title: "سال",
className: "rounded-tl-lg rounded-bl-lg",
},
],
};

Loading…
Cancel
Save