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 / assets / js / molecules / dashboard-button.js

dashboard-button.js in Elementor Website Builder – more than just a page builder 3.8.0-beta1, at app/assets/js/molecules/dashboard-button.js

33 lines 737 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import Button from 'elementor-app/ui/molecules/button';
2
3 import useAction from 'elementor-app/hooks/use-action';
4
5 import { arrayToClassName } from 'elementor-app/utils/utils.js';
6
7 export default function DashboardButton( props ) {
8 const action = useAction(),
9 baseClassName = 'e-app-dashboard-button',
10 classes = [ baseClassName, props.className ];
11
12 return (
13 <Button
14 { ...props }
15 className={ arrayToClassName( classes ) }
16 text={ props.text }
17 onClick={ action.backToDashboard }
18 />
19 );
20 }
21
22 DashboardButton.propTypes = {
23 className: PropTypes.string,
24 text: PropTypes.string,
25 };
26
27 DashboardButton.defaultProps = {
28 className: '',
29 variant: 'contained',
30 color: 'primary',
31 text: __( 'Back to dashboard', 'elementor' ),
32 };
33