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 / kit-library / assets / js / components / error-screen.js

error-screen.js in Elementor Website Builder – more than just a page builder 3.8.0-beta1, at app/modules/kit-library/assets/js/components/error-screen.js

55 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /* eslint-disable jsx-a11y/alt-text */
2 import { Heading, Text, Grid, Button } from '@elementor/app-ui';
3 import { appsEventTrackingDispatch } from 'elementor-app/event-track/apps-event-tracking';
4
5 import './error-screen.scss';
6
7 export default function ErrorScreen( props ) {
8 const onClick = () => {
9 appsEventTrackingDispatch(
10 'kit-library/go-back-to-view-kits',
11 {
12 page_source: 'home page',
13 element_position: 'empty state',
14 category: props.button.category && ( '/favorites' === props.button.category ? 'favorites' : 'all' ),
15 },
16 );
17 props.button.action();
18 };
19 return (
20
21 <Grid container alignItems="center" justify="center" direction="column" className="e-kit-library__error-screen">
22 <img src={ `${ elementorAppConfig.assets_url }images/no-search-results.svg` } />
23 <Heading
24 tag="h3"
25 variant="display-1"
26 className="e-kit-library__error-screen-title"
27 >
28 { props.title }
29 </Heading>
30 <Text variant="xl" className="e-kit-library__error-screen-description">
31 { props.description } { ' ' }
32 <Button
33 text={ props.button.text }
34 color="link"
35 onClick={ onClick }
36 url={ props.button.url }
37 target={ props.button.target }
38 />
39 </Text>
40 </Grid>
41 );
42 }
43
44 ErrorScreen.propTypes = {
45 title: PropTypes.string,
46 description: PropTypes.string,
47 button: PropTypes.shape( {
48 text: PropTypes.string,
49 action: PropTypes.func,
50 url: PropTypes.string,
51 target: PropTypes.string,
52 category: PropTypes.string,
53 } ),
54 };
55