PluginProbe
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce / 3.1.1
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce v3.1.1
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 / controls / deprecatedRenderIcon.js

deprecatedRenderIcon.js in CartFlows – Funnel Builder & Checkout Plugin for WooCommerce 3.1.1, at modules/gutenberg/src/controls/deprecatedRenderIcon.js

30 lines 774 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * Set inline CSS class.
3 *
4 * @param {Object} props - The block object.
5 * @return {Array} The inline CSS class.
6 */
7
8 import parseSVG from './parseIcon'
9
10 function renderSVG ( svg ) {
11
12 svg = parseSVG( svg )
13
14 const fontAwesome = uagb_blocks_info.uagb_svg_icons[ svg ];
15
16 if ( 'undefined' !== typeof fontAwesome ) {
17
18 const viewbox_array = ( fontAwesome.svg.hasOwnProperty( 'brands' ) ) ? fontAwesome.svg.brands.viewBox : fontAwesome.svg.solid.viewBox
19 const path = ( fontAwesome.svg.hasOwnProperty( 'brands' ) ) ? fontAwesome.svg.brands.path : fontAwesome.svg.solid.path
20 const viewBox = viewbox_array.join( ' ' )
21
22 return (
23 <svg xmlns="http://www.w3.org/2000/svg" viewBox={viewBox}><path d={path}></path></svg>
24 )
25 }
26
27 }
28
29 export default renderSVG
30