PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.4
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.4
4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 All 139 releases
learnpress / assets / src / apps / js / blocks / instructor-elements / instructor-social / edit.js

edit.js in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.4.4, at assets/src/apps/js/blocks/instructor-elements/instructor-social/edit.js

42 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { __ } from '@wordpress/i18n';
2 import { useBlockProps, InspectorControls } from '@wordpress/block-editor';
3 import { PanelBody, ToggleControl } from '@wordpress/components';
4
5 export const edit = ( props ) => {
6 const blockProps = useBlockProps();
7 return (
8 <>
9 <InspectorControls>
10 <PanelBody title={ __( 'Settings', 'learnpress' ) }>
11 <ToggleControl
12 label={ __( 'Open links in new tab', 'learnpress' ) }
13 checked={ props.attributes.target ? true : false }
14 onChange={ ( value ) => {
15 props.setAttributes( {
16 target: value ? true : false,
17 } );
18 } }
19 />
20 <ToggleControl
21 label={ __( 'Add nofollow attribute', 'learnpress' ) }
22 checked={ props.attributes.nofollow ? true : false }
23 onChange={ ( value ) => {
24 props.setAttributes( {
25 nofollow: value ? true : false,
26 } );
27 } }
28 />
29 </PanelBody>
30 </InspectorControls>
31 <div { ...blockProps }>
32 <div className="instructor-social">
33 <i className="lp-user-ico lp-icon-facebook"></i>
34 <i className="lp-user-ico lp-icon-twitter"></i>
35 <i className="lp-user-ico lp-icon-youtube-play"></i>
36 <i className="lp-user-ico lp-icon-linkedin"></i>
37 </div>
38 </div>
39 </>
40 );
41 };
42