File "site-area.js"
Full Path: /home/warrior1/public_html/wp-content/plugins/elementor/app/modules/import-export/assets/js/shared/kit-data/components/site-area/site-area.js
File size: 895 bytes
MIME-type: text/x-java
Charset: utf-8
import Text from 'elementor-app/ui/atoms/text';
import Icon from 'elementor-app/ui/atoms/icon';
import InlineLink from 'elementor-app/ui/molecules/inline-link';
import { appsEventTrackingDispatch } from 'elementor-app/event-track/apps-event-tracking';
export default function SiteArea( { text, link } ) {
const eventTracking = ( command, eventType = 'click' ) => {
appsEventTrackingDispatch(
command,
{
site_area: text,
page_source: 'import complete',
event_type: eventType,
},
);
};
return (
<InlineLink url={ link } color="secondary" underline="none" onClick={ () => eventTracking( 'kit-library/open-site-area' ) }>
<Text className="e-app-import-export-kit-data__site-area">
{ text } { link && <Icon className="eicon-editor-external-link" /> }
</Text>
</InlineLink>
);
}
SiteArea.propTypes = {
text: PropTypes.string,
link: PropTypes.string,
};