PluginProbe
Canvas / 2.4.9
Canvas v2.4.9
2.5.5 2.5.4 trunk 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 All 54 releases
canvas / components / basic-elements / block-progress / block.jsx

block.jsx in Canvas 2.4.9, at components/basic-elements/block-progress/block.jsx

32 lines 580 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * WordPress dependencies
3 */
4 const {
5 addFilter,
6 } = wp.hooks;
7
8 /**
9 * Internal dependencies
10 */
11 import ProgressBlockEdit from './edit.jsx';
12
13 /**
14 * Custom block Edit output for Progress block.
15 *
16 * @param {JSX} edit Original block edit.
17 * @param {Object} blockProps Block data.
18 *
19 * @return {JSX} Block edit.
20 */
21 function editRender( edit, blockProps ) {
22 if ( 'canvas/progress' === blockProps.name ) {
23 return (
24 <ProgressBlockEdit { ...blockProps } />
25 );
26 }
27
28 return edit;
29 }
30
31 addFilter( 'canvas.customBlock.editRender', 'canvas/progress/editRender', editRender );
32