HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/confeduphaar/www/wp-content/plugins/essential-blocks/src/blocks/icon/src/deprecated.js
/**
 * WordPress dependencies
 */
import { useBlockProps } from "@wordpress/block-editor";
import {
EBDisplayIcon
} from "@essential-blocks/controls";
import attributes from "./attributes";

const deprecated = [
    {
        attributes: { ...attributes },
        supports: {
            align: ["full"],
        },
        save: ({ attributes }) => {
            const { blockId, icon, iconView, iconShape, classHook } = attributes;
            const viewClass = iconView !== "default" ? " eb-icon-view-" + iconView : "";
            const shapeClass = iconView !== "default" ? " eb-icon-shape-" + iconShape : "";

            return (
                <div {...useBlockProps.save()}>
                    <div
                        className={`eb-parent-wrapper eb-parent-${blockId} ${classHook}`}
                    >
                        <div
                            className={`eb-icon-wrapper ${blockId}${` eb-icon-view-${iconView}`}${shapeClass}`}
                            data-id={blockId}
                        >
                            <div className="eb-icon-container">
                                <EBDisplayIcon icon={icon} />
                            </div>
                        </div>
                    </div>
                </div>
            );
        },
    },
    {
        attributes: { ...attributes },
        supports: {
            align: ["full"],
        },
        save: ({ attributes }) => {
            const { blockId, icon, iconView, iconShape, classHook } = attributes;
            const viewClass = iconView !== "default" ? " eb-icon-view-" + iconView : "";
            const shapeClass = iconView !== "default" ? " eb-icon-shape-" + iconShape : "";

            return (
                <div {...useBlockProps.save()}>
                    <div
                        className={`eb-parent-wrapper eb-parent-${blockId} ${classHook}`}
                    >
                        <div
                            className={`eb-icon-wrapper ${blockId}${` eb-icon-view-${iconView}`}${shapeClass}`}
                            data-id={blockId}
                        >
                            <div className="eb-icon-container">
                                <i className={icon}></i>
                            </div>
                        </div>
                    </div>
                </div>
            );
        },
    },
];

export default deprecated;