update src/components/Accordion/AccordionDesign1/index.js, src/components/ButtonDesign/Button/index.js and src/components/MiniComponents/OfferSection/index.js

master
mahdi 2 years ago
parent e2ebfac5aa
commit b1534d62ad
  1. 12
      src/components/Accordion/AccordionDesign1/index.js
  2. 8
      src/components/ButtonDesign/Button/index.js
  3. 9
      src/components/MiniComponents/OfferSection/index.js

@ -53,12 +53,16 @@ const AccordionDesign1 = ({ items, vod }) => {
item.subItems.map((subItem, i) => ( item.subItems.map((subItem, i) => (
<div className="flex flex-row items-center justify-between p-3 border-b-2 border-surfaceBorder cursor-pointer "> <div className="flex flex-row items-center justify-between p-3 border-b-2 border-surfaceBorder cursor-pointer ">
<div className="flex flex-row items-center"> <div className="flex flex-row items-center">
{vod === !true && (
<img <img
src="images/accordionGroup2725.svg" src="images/accordionGroup2725.svg"
className="w-4" className="w-4"
alt="line" alt="line"
/> />
<span className="mr-3 text-sm">1</span> )}
<span className={`text-sm ${vod === true ? "mr-0" : "mr-3"}`}>
1
</span>
</div> </div>
<div className="w-0.5 h-6 mx-3 bg-surfaceBorder"></div> <div className="w-0.5 h-6 mx-3 bg-surfaceBorder"></div>
<p className="text-sm flex-1">{subItem.name}</p> <p className="text-sm flex-1">{subItem.name}</p>
@ -76,7 +80,6 @@ const AccordionDesign1 = ({ items, vod }) => {
</> </>
) : ( ) : (
<> <>
{" "}
<img <img
src="images/accordionGroup2724.svg" src="images/accordionGroup2724.svg"
className="w-8 rounded" className="w-8 rounded"
@ -86,7 +89,7 @@ const AccordionDesign1 = ({ items, vod }) => {
src="images/accordionGroup2723.svg" src="images/accordionGroup2723.svg"
className="w-8 rounded" className="w-8 rounded"
alt="edit-button" alt="edit-button"
/>{" "} />
</> </>
)} )}
</div> </div>
@ -97,10 +100,11 @@ const AccordionDesign1 = ({ items, vod }) => {
</section> </section>
); );
}; };
export default AccordionDesign1; export default AccordionDesign1;
AccordionDesign1.defaultProps = { AccordionDesign1.defaultProps = {
vod: false, vod: true,
items: [ items: [
{ {
title: title:

@ -6,9 +6,15 @@ const Button = ({
icon, icon,
text, text,
onClick, onClick,
sharpStyle,
}) => { }) => {
return ( return (
<button <button
style={{
clipPath: sharpStyle
? "polygon(24% 0, 100% 0%, 100% 99%, 0% 100%)"
: "",
}}
onClick={onClick} onClick={onClick}
className={`flex items-center justify-center transiton ease-linear duration-200 ${className}`} className={`flex items-center justify-center transiton ease-linear duration-200 ${className}`}
> >
@ -32,4 +38,6 @@ Button.defaultProps = {
iconHolderClassName: "bg-darkGreenBg mr-2", iconHolderClassName: "bg-darkGreenBg mr-2",
iconClassName: "w-4", iconClassName: "w-4",
icon: false, icon: false,
sharpStyle: false,
}; };

@ -4,16 +4,11 @@ import Button from "../../ButtonDesign/Button";
const OfferSection = () => { const OfferSection = () => {
return ( return (
<div className="w-full flex flex-row items-center justify-between"> <div className="w-full flex flex-row items-center justify-between">
<button
className="bg-red-400 text-xs py-2 pr-2 pl-5"
style={{ clipPath: "polygon(24% 0, 100% 0%, 100% 99%, 0% 100%)" }}
>
mahdi
</button>
<Button <Button
sharpStyle={true}
text={"پیشنهاد سردبیر"} text={"پیشنهاد سردبیر"}
className={ className={
"w-[120px] px-2 py-2 bg-surface text-primaryDark text-xs font-bold rounded relative transform" "w-[120px] py-2 pr-2 pl-5 bg-surface text-primaryDark text-xs font-bold rounded relative transform"
} }
/> />
{/* divider */} {/* divider */}

Loading…
Cancel
Save