PluginProbe
WP Ultimate Post Grid / 4.1.1
WP Ultimate Post Grid v4.1.1
4.1.1 trunk 1.5 1.6 1.7 1.7.1 1.7.2 1.8 1.9 2.0 2.1 2.2 2.3 2.4.0 2.5.0 2.6.0 2.7.0 2.8.0 2.8.2 3.0.0 3.3.0 3.4.0 3.5.0 3.6.0 3.7.0 All 32 releases
wp-ultimate-post-grid / assets / js / admin-template / general / Icon.js

Icon.js in WP Ultimate Post Grid 4.1.1, at assets/js/admin-template/general/Icon.js

37 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import React from 'react';
2 import SVG from 'react-inlinesvg';
3
4 import IconManage from '../../../icons/template/manage.svg';
5 import IconProperties from '../../../icons/template/properties.svg';
6 import IconBlocks from '../../../icons/template/blocks.svg';
7 import IconAdd from '../../../icons/template/add.svg';
8 import IconRemove from '../../../icons/template/remove.svg';
9 import IconHTML from '../../../icons/template/html.svg';
10 import IconCSS from '../../../icons/template/css.svg';
11
12 const icons = {
13 manage: IconManage,
14 properties: IconProperties,
15 blocks: IconBlocks,
16 add: IconAdd,
17 remove: IconRemove,
18 html: IconHTML,
19 css: IconCSS,
20 };
21
22 const Icon = (props) => {
23 let icon = icons.hasOwnProperty(props.type) ? icons[props.type] : false;
24
25 if ( !icon ) {
26 return <span className="wpupg-template-noicon">&nbsp;</span>;
27 }
28
29 return (
30 <span className='wpupg-template-icon'>
31 <SVG
32 src={icon}
33 />
34 </span>
35 );
36 }
37 export default Icon;