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

master
mahdi 3 years ago
parent b1534d62ad
commit 7181cbd580
  1. 27
      src/components/Accordion/AccordionDesign1/index.js
  2. 6
      src/components/ButtonDesign/Button/index.js
  3. 8
      src/components/MiniComponents/OfferSection/index.js
  4. 2
      src/components/ThemeColor/default.js

@ -51,32 +51,34 @@ const AccordionDesign1 = ({ items, vod }) => {
{/* child */} {/* child */}
{activeAccordion === item && {activeAccordion === item &&
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 && ( {vod === !true && (
<img <img
src="images/accordionGroup2725.svg" src="images/accordionGroup2725.svg"
className="w-4" className="w-3"
alt="line" alt="line"
/> />
)} )}
<span className={`text-sm ${vod === true ? "mr-0" : "mr-3"}`}> <span className={`text-sm ${vod === true ? "mr-0" : "mr-3"}`}>
1 {i + 1}
</span> </span>
</div> </div>
<div className="w-0.5 h-6 mx-3 bg-surfaceBorder"></div> <div className="w-0.5 h-5 mx-3 bg-surfaceBorder"></div>
<p className="text-sm flex-1">{subItem.name}</p> <p className="text-sm flex-1">{subItem.name}</p>
<div className="flex flex-row items-center justify-end gap-x-3 flex-1"> <div className="flex flex-row items-center justify-end gap-x-3 flex-1">
{vod ? ( {vod ? (
<> <>
<p className="text-xs"> <div className="flex flex-row items-center ml-7">
دقیقه: <p className="text-xs">
<span>{item.min}</span> دقیقه:
</p> <span>{item.min}</span>
<Button </p>
className="px-2 py-1 text-primary text-sm border border-surfaceBorder rounded mr-4" <Button
text={"پخش"} className="px-2 py-1 text-primary text-sm border border-surfaceBorder rounded mr-4"
/> text={"پخش"}
/>
</div>
</> </>
) : ( ) : (
<> <>
@ -105,6 +107,7 @@ export default AccordionDesign1;
AccordionDesign1.defaultProps = { AccordionDesign1.defaultProps = {
vod: true, vod: true,
items: [ items: [
{ {
title: title:

@ -7,13 +7,12 @@ const Button = ({
text, text,
onClick, onClick,
sharpStyle, sharpStyle,
clippath,
}) => { }) => {
return ( return (
<button <button
style={{ style={{
clipPath: sharpStyle clipPath: sharpStyle ? clippath : "",
? "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}`}
@ -40,4 +39,5 @@ Button.defaultProps = {
icon: false, icon: false,
sharpStyle: false, sharpStyle: false,
clippath: "polygon(24% 0, 100% 0%, 100% 99%, 0% 100%)",
}; };

@ -8,9 +8,15 @@ const OfferSection = () => {
sharpStyle={true} sharpStyle={true}
text={"پیشنهاد سردبیر"} text={"پیشنهاد سردبیر"}
className={ className={
"w-[120px] py-2 pr-2 pl-5 bg-surface text-primaryDark text-xs font-bold rounded relative transform" "w-[133px] py-2 pr-2 pl-5 bg-surface text-primaryDark text-xs font-bold rounded relative transform"
} }
/> />
<Button
sharpStyle={true}
clippath={" polygon(68% 0, 89% 0, 20% 100%, 0 100%)"}
text={null}
className={"bg-yellow-400 w-12 h-8 -mr-6"}
/>
{/* divider */} {/* divider */}
<hr className="w-full mr-4 border border-surfaceBorder" /> <hr className="w-full mr-4 border border-surfaceBorder" />
{/* left Button */} {/* left Button */}

@ -11,7 +11,7 @@ const defaultTheme = {
backgroundText: "#000000", backgroundText: "#000000",
surface: "#6eb1d2", surface: "#6eb1d2",
surfaceText: "#000000", surfaceText: "#000000",
surfaceBorder: "#FF08AD", surfaceBorder: "#c8d6e5",
info: "#43c1ff", info: "#43c1ff",
infoText: "#000000", infoText: "#000000",
success: "#42b258", success: "#42b258",

Loading…
Cancel
Save