UNPKG

react-jam-ui

Version:

React JAM UI components

31 lines (28 loc) 914 B
import React from 'react' import classNames from 'classnames' export default class IconClose 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"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>` const classes = classNames( 'icon', 'icon-close', className ); return <i className={ classes } dangerouslySetInnerHTML={{__html: icon }} { ...rest } />; } }