hello-theme/assets/dev/js/admin/panels/action-links-panel.js

49 lines
2 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { __ } from '@wordpress/i18n';
import { ActionLinks } from '../components/action-links.js';
const actionLinks = {
'install-elementor':
{
image: helloAdminData.templateDirectoryURI + '/assets/images/elementor.svg',
alt: __( 'Elementor', 'hello-elementor' ),
title: __( 'Install Elementor', 'hello-elementor' ),
message: __( 'Create cross-site header & footer using Elementor.', 'hello-elementor' ),
button: __( 'Install Elementor', 'hello-elementor' ),
link: helloAdminData.actionLinkURL,
},
'activate-elementor':
{
image: helloAdminData.templateDirectoryURI + '/assets/images/elementor.svg',
alt: __( 'Elementor', 'hello-elementor' ),
title: __( 'Activate Elementor', 'hello-elementor' ),
message: __( 'Create cross-site header & footer using Elementor.', 'hello-elementor' ),
button: __( 'Activate Elementor', 'hello-elementor' ),
link: helloAdminData.actionLinkURL,
},
'activate-header-footer-experiment':
{
image: helloAdminData.templateDirectoryURI + '/assets/images/elementor.svg',
alt: __( 'Elementor', 'hello-elementor' ),
title: __( 'Style using Elementor', 'hello-elementor' ),
message: __( 'Design your cross-site header & footer from Elementors "Site Settings" panel.', 'hello-elementor' ),
button: __( 'Activate header & footer experiment', 'hello-elementor' ),
link: helloAdminData.actionLinkURL,
},
'style-header-footer':
{
image: helloAdminData.templateDirectoryURI + '/assets/images/elementor.svg',
alt: __( 'Elementor', 'hello-elementor' ),
title: __( 'Style cross-site header & footer', 'hello-elementor' ),
message: __( 'Customize your cross-site header & footer from Elementors "Site Settings" panel.', 'hello-elementor' ),
button: __( 'Start Designing', 'hello-elementor' ),
link: helloAdminData.actionLinkURL,
},
};
export const ActionLinksPanel = () => {
if ( ! helloAdminData.actionLinkType ) {
return;
}
return <ActionLinks { ...actionLinks[ helloAdminData.actionLinkType ] } />;
};