UNPKG

react-jam-ui

Version:

React JAM UI components

31 lines (28 loc) 1.02 kB
import React from 'react' import classNames from 'classnames' export default class IconCalendar 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="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>` const classes = classNames( 'icon', 'icon-calendar', className ); return <i className={ classes } dangerouslySetInnerHTML={{__html: icon }} { ...rest } />; } }