update src/components/ButtonDesign/ButtonNextToEachOther/index.js and src/components/Datepicker/CalenderList/index.js

master
mahdi 2 years ago
parent c511ab8046
commit 37c3f0fba7
  1. 45
      src/components/ButtonDesign/ButtonNextToEachOther/index.js
  2. 2
      src/components/Datepicker/CalenderList/index.js

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

@ -22,3 +22,5 @@ const CalenderList = () => {
}; };
export default CalenderList; export default CalenderList;
CalenderList.defaultProps = {};

Loading…
Cancel
Save