__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
/**
* WordPress dependencies
*/
import { InnerBlocks } from "@wordpress/block-editor";
import { BlockProps } from "@essential-blocks/controls";
const Save = ({ attributes }) => {
const {
blockId,
classHook,
accordionType,
displayIcon,
tabIcon,
expandedIcon,
transitionDuration,
accordionLists,
titleOrientation,
} = attributes;
const allNotClickable = accordionLists?.every(
(item) => item.clickable === false,
);
const defaultImageUrl =
EssentialBlocksLocalize?.image_url + "/image-placeholder.jpg";
const accordionTypeClass =
accordionType === "image"
? " eb-accordion-type-image"
: accordionType === "horizontal"
? " eb-accordion-type-horizontal"
: "";
const orientationClass =
accordionType === "horizontal"
? titleOrientation === "bottom-top"
? " eb-accordion-bottom-top"
: " eb-accordion-top-bottom"
: "";
return (
<BlockProps.Save attributes={attributes}>
<div
className={`eb-parent-wrapper eb-parent-${blockId} ${classHook}`}
>
<div
className={`eb-accordion-container ${blockId}${accordionTypeClass}${orientationClass}`}
data-accordion-type={accordionType || "toggle"}
data-tab-icon={displayIcon ? tabIcon : ""}
data-expanded-icon={displayIcon ? expandedIcon : ""}
data-transition-duration={
transitionDuration
? Number(transitionDuration) * 1000
: 500
}
>
<div className="eb-accordion-inner">
<InnerBlocks.Content />
</div>
{accordionType === "image" && (
<div className="eb-accordion-image-container">
<img
src={
(allNotClickable && accordionLists[0]?.imageUrl || "")
}
alt={
(allNotClickable &&
accordionLists[0]?.imageAlt) ||
""
}
/>
</div>
)}
</div>
</div>
</BlockProps.Save>
);
};
export default Save;
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| components | Folder | 0750 |
|
|
| constants | Folder | 0750 |
|
|
| attributes.js | File | 8.7 KB | 0640 |
|
| deprecated.js | File | 10.72 KB | 0640 |
|
| edit.js | File | 21.25 KB | 0640 |
|
| editor.scss | File | 3.16 KB | 0640 |
|
| example.js | File | 519 B | 0640 |
|
| frontend.js | File | 30.58 KB | 0640 |
|
| helpers.js | File | 1.15 KB | 0640 |
|
| icon.js | File | 2.18 KB | 0640 |
|
| icon.svg | File | 1.92 KB | 0640 |
|
| index.js | File | 796 B | 0640 |
|
| inspector.js | File | 56.69 KB | 0640 |
|
| save.js | File | 2.6 KB | 0640 |
|
| style.js | File | 46.34 KB | 0640 |
|
| style.scss | File | 2.83 KB | 0640 |
|