![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@elementor/editor-app-bar
Advanced tools
[!WARNING] Please refrain from accessing or depending on functions and variables starting with double underscores, as they are subject to change without notice. Naming convention involving double underscores (
__
) as a prefix to indicate that a function or variable is meant for internal use and should not be accessed or relied upon by third-party developers.
There are 5 types of menus:
mainMenu
- Provides access to the main features and functionality of the application. Represented by an Elementor logo that changes to a hamburger.toolsMenu
- A menu where the user can access various editing tools (e.g. "add widget", "structure", etc.) for manipulating the data or interface in some way. This
section may contain a limited number of buttons for common tools, as well as a dropdown menu for accessing additional
ones.utilitiesMenu
- A menu where the user can access various utility features that are not directly related to the main
functionality of the application. This may include options for accessing the finder, getting help, or accessing other miscellaneous features.documentOptionsMenu
- A menu where the user can access various options for saving the document. This may include
options for saving as draft or conditional options related to the document (e.g. "display conditions", etc.).integrationsMenu
- A sub-menu inside the mainMenu
where the user can access various options for integrating with other services. This may
include options for connecting to a third-party service or accessing other miscellaneous features.Each menu contains a list of items, each item can be:
Action
- A button that performs an action.Link
- A link that navigates to a different page.ToggleAction
- A button that toggles between two states (checked or unchecked).Let's extend the integrationsMenu
with multiple examples that will cover all the types of items:
import { integrationsMenu } from '@elementor/editor-app-bar';
import { PlusIcon } from '@elementor/icons';
import { __ } from '@wordpress/i18n';
integrationsMenu.registerAction( {
id: 'example-action-id',
props: {
title: __( 'My Custom Action', 'elementor' ),
icon: PlusIcon, // A react component that renders an SVG icon
disabled: false, // Optional
onClick: () => alert( 'Custom action triggered!' ), // Optional
}
} );
import { integrationsMenu } from '@elementor/editor-app-bar';
import { EyeIcon } from '@elementor/icons';
import { __ } from '@wordpress/i18n';
integrationsMenu.registerToggleAction( {
name: 'my-custom-toggle',
useProps: () => {
const [ isSelected, setIsSelected ] = useState( false );
return {
title: __( 'My Custom Toggle', 'elementor' ),
icon: EyeIcon,
selected: isSelected, // Optional
onClick: () => setIsSelected( ( prev ) => ! prev ), // Optional
disabled: false, // Optional
};
},
} );
import { integrationsMenu } from '@elementor/editor-app-bar';
import { LinkIcon } from '@elementor/icons';
import { __ } from '@wordpress/i18n';
integrationsMenu.registerLink( {
name: 'my-custom-link',
props: {
title: __( 'My Custom Link', 'elementor' ),
icon: LinkIcon,
href: 'https://elementor.com', // Optional
target: '_blank', // Optional
},
} );
[!NOTE] You can use either
props
oruseProps
(depending on your need) for all the items types:
props
- An object with the action props.useProps
- A React hook that returns the action props and lets you make the props reactive.
[!NOTE] The
icon
property can be any React component that renders an SVG icon, it is recommended to useSVGIcon
from@elementor/ui
TBD
FAQs
App Bar extension for @elementor/editor
The npm package @elementor/editor-app-bar receives a total of 622 weekly downloads. As such, @elementor/editor-app-bar popularity was classified as not popular.
We found that @elementor/editor-app-bar demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.