PluginProbe
Elementor Website Builder – more than just a page builder / 3.8.0-beta1
Elementor Website Builder – more than just a page builder v3.8.0-beta1
4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 All 457 releases
elementor / app / modules / onboarding / assets / js / components / card.js

card.js in Elementor Website Builder – more than just a page builder 3.8.0-beta1, at app/modules/onboarding/assets/js/components/card.js

33 lines 833 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 export default function Card( { image, imageAlt, text, link, name, clickAction } ) {
2 const onClick = () => {
3 elementorCommon.events.dispatchEvent( {
4 event: 'starting canvas click',
5 version: '',
6 details: {
7 placement: elementorAppConfig.onboarding.eventPlacement,
8 selection: name,
9 },
10 } );
11
12 if ( clickAction ) {
13 clickAction();
14 }
15 };
16
17 return (
18 <a className="e-onboarding__card" href={ link } onClick={ onClick }>
19 <img className="e-onboarding__card-image" src={ image } alt={ imageAlt } />
20 <div className="e-onboarding__card-text">{ text }</div>
21 </a>
22 );
23 }
24
25 Card.propTypes = {
26 image: PropTypes.string.isRequired,
27 imageAlt: PropTypes.string.isRequired,
28 text: PropTypes.string.isRequired,
29 link: PropTypes.string.isRequired,
30 name: PropTypes.string.isRequired,
31 clickAction: PropTypes.func,
32 };
33