UNPKG

react-jam-ui

Version:

React JAM UI components

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