# wp-ultimate-post-grid/4.0.1/assets/js/admin-template/general/Icon.js

WP Ultimate Post Grid, version 4.0.1. 37 lines.

- Page: https://pluginprobe.com/plugins/wp-ultimate-post-grid/4.0.1/code/assets/js/admin-template/general/Icon.js
- Raw: https://pluginprobe.com/plugins/wp-ultimate-post-grid/4.0.1/raw/assets/js/admin-template/general/Icon.js
- Modified: 2020-07-22T13:11:56+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wp-ultimate-post-grid/4.0.1/code/assets/js/admin-template/general/Icon.js#L10-L20`.

```javascript
import React from 'react';
import SVG from 'react-inlinesvg';

import IconManage from '../../../icons/template/manage.svg';
import IconProperties from '../../../icons/template/properties.svg';
import IconBlocks from '../../../icons/template/blocks.svg';
import IconAdd from '../../../icons/template/add.svg';
import IconRemove from '../../../icons/template/remove.svg';
import IconHTML from '../../../icons/template/html.svg';
import IconCSS from '../../../icons/template/css.svg';
 
const icons = {
    manage: IconManage,
    properties: IconProperties,
    blocks: IconBlocks,
    add: IconAdd,
    remove: IconRemove,
    html: IconHTML,
    css: IconCSS,
};

const Icon = (props) => {
    let icon = icons.hasOwnProperty(props.type) ? icons[props.type] : false;

    if ( !icon ) {
        return <span className="wpupg-template-noicon">&nbsp;</span>;
    }

    return (
        <span className='wpupg-template-icon'>
            <SVG
                src={icon}
            />
        </span>
    );
}
export default Icon;
```
