PluginProbe
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce / 3.3.0
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce v3.3.0
3.3.0 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.1 trunk 1.0.4 1.1.0 1.1.0.1 1.1.1 1.1.10 1.1.11 1.1.12 1.1.13 1.1.14 1.1.15 1.1.16 1.1.17 1.1.18 1.1.19 1.1.2 All 162 releases
cartflows / modules / gutenberg / src / components / icon-picker / index.js

index.js in CartFlows – Funnel Builder & Checkout Plugin for WooCommerce 3.3.0, at modules/gutenberg/src/components/icon-picker/index.js

41 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import FontIconPicker from '@fonticonpicker/react-fonticonpicker';
2 import React, { useLayoutEffect } from 'react';
3 import styles from './editor.lazy.scss';
4 import renderSVG from '@Controls/renderIcon';
5 import { __ } from '@wordpress/i18n';
6
7 const UAGIconPicker = ( props ) => {
8 // Add and remove the CSS on the drop and remove of the component.
9 useLayoutEffect( () => {
10 styles.use();
11 return () => {
12 styles.unuse();
13 };
14 }, [] );
15
16 return (
17 <div className="components-base-control uag-icon-picker">
18 <span className="uag-control-label">
19 { props?.label ||
20 __( 'Icon', 'ultimate-addons-for-gutenberg' ) }
21 </span>
22 <FontIconPicker
23 icons={ props?.icons || wp.UAGBSvgIcons }
24 renderFunc={ renderSVG }
25 theme="default"
26 value={ props.value }
27 onChange={ props?.onChange }
28 isMulti={ props.isMulti || false }
29 noSelectedPlaceholder={
30 props.noSelectedPlaceholder ||
31 __( 'Select Icon', 'ultimate-addons-for-gutenberg' )
32 }
33 />
34 { props.help && (
35 <p className="uag-control-help-notice">{ props.help }</p>
36 ) }
37 </div>
38 );
39 };
40 export default UAGIconPicker;
41