UNPKG

react-jam-ui

Version:

React JAM UI components

31 lines (28 loc) 1.01 kB
import React from 'react' import classNames from 'classnames' export default class IconGrid extends React.Component { constructor(){ super(); this.state = { }; } render() { const { size, className, ...rest } = this.props; const wh = size || '1em' const icon = `<svg xmlns="http://www.w3.org/2000/svg" width="${wh}" height="${wh}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="7"></rect><rect x="14" y="3" width="7" height="7"></rect><rect x="14" y="14" width="7" height="7"></rect><rect x="3" y="14" width="7" height="7"></rect></svg>` const classes = classNames( 'icon', 'icon-grid', className ); return <i className={ classes } dangerouslySetInnerHTML={{__html: icon }} { ...rest } />; } }