UNPKG

react-ionicons

Version:

A React SVG ionicon component

82 lines (64 loc) 3.77 kB
import React, { Component } from 'react' import PropTypes from 'prop-types' import SVG from './SVG' class IosNutritionOutline extends Component { constructor(props) { super(props) this.state = {classNames: [], animationActive: false} this._getClasses = this._getClasses.bind(this) } render() { const style = { ...this.props.style, color: this.props.color, fontSize: this.props.fontSize, } return ( <SVG style={this.props.style} className={this._getClasses()} fill={this.props.color} width={this.props.fontSize} height={this.props.fontSize} viewBox="0 0 1024 1024" onClick={this.props.onClick} rotate={this.props.rotate ? 1 : 0} shake={this.props.shake ? 1 : 0} beat={this.props.beat ? 1 : 0} > <path d="M716 467.71l0.826-0.078c-0.274-0.274-0.092-0.202-0.37-0.474l-156.868-157.158c-11.666-12-28.386-20.308-46.97-20.308-23.622 0-44.23 12.308-55.27 32.308h-0.014c0 0-14.18 21.988-36.54 57.748l65.062 79.274c5.878 7.538 6.592 15.602 2.822 19.378l-0.228 0.142c-1.818 1.818-4.042 2.66-6.548 2.66-3.816 0-8.284-1.98-12.97-5.536l-71.744-58.836c-47.092 75.31-113.354 181.268-166.9 266.902l38.144 46.674c5.878 7.54 6.592 15.768 2.82 19.544l-0.228 0.228c-1.822 1.826-4.056 2.684-6.574 2.684-3.81 0-8.272-1.962-12.944-5.51l-42.134-33.066c-39.904 63.816-69.372 110.642-73.372 114.446v0.006c-6 10.124-8.17 22.264-8.17 35.328 0 35.31 29.314 63.934 64.57 63.934 15.642 0 29.14-6.79 41.598-15l229.302-168.218-57.676-70.716c-5.88-7.538-6.536-15.774-2.764-19.55l0.256-0.228c1.824-1.824 4.068-2.682 6.588-2.682 3.81 0 8.28 1.962 12.952 5.51l75.728 63.18c109.676-80.492 211.78-154.296 211.78-154.296h0.010c15.678-12 24.946-31.422 24.946-52.476 0-17.408-7.12-34.28-19.12-45.808v-0.006zM691.062 539.668c-5.328 3.868-93.384 67.864-191.528 139.798l-57.612-47.834c-10.49-7.962-21.326-11.996-32.216-11.996-10.93 0-21.184 4.194-28.916 11.818l-0.128 0.124-0.166 0.164-0.166 0.166c-15.616 15.642-15.522 41.646 0.222 61.834l0.22 0.286 0.226 0.276 36.446 44.624-201.312 147.792c-10.132 6.608-16.854 9.314-23.084 9.314-17.644 0-32-14.342-32-31.966 0-6.172 1.388-12.090 4.034-17.246 4.782-6.322 13.2-19.752 37.31-58.702 5.086-8.216 10.504-16.974 16.268-26.258l13.17 10.664 0.4 0.304c10.49 7.962 21.33 12 32.222 12 11.034 0 21.384-4.278 29.142-12.046l0.228-0.226c15.612-15.634 15.512-41.64-0.236-61.832l-0.226-0.288-0.23-0.284-23.628-28.91 135.504-216.692 44.652 36.586c10.508 7.976 21.356 12.020 32.246 12.020 9.908 0 19.262-3.45 26.678-9.78l0.922-0.674 1.742-1.748c15.58-15.606 15.48-41.556-0.236-61.708l-0.24-0.306-50.726-61.378c5.914-9.406 10.914-16.982 14.81-22.976l10.418-16.988c5.554-10.050 15.522-16.314 27.346-16.314 8.734 0 17.52 4.084 24.114 10.86l9.402 9.856h0.244l137.622 138.57v0.752l10.372 9.432c5.586 5.38 9.078 13.564 9.078 22.454 0 10.392-4.516 20.246-12.388 26.458z M879.988 230.35l-192.832 111.51 132.504-229.876-27.638-15.984-4.976 8.626-141.55 245.57 33.34 33.392 217.112-125.552z"></path> </SVG> ) } _getClasses() { return [...this.state.classNames, this.props.className].join(' ') } _getPathByIconName() { let icon = icons.find(icon => icon.tags[0] === this.props.icon) if (icon) return icon.paths.join(' ') return '' } } IosNutritionOutline.defaultProps = { // style style: {}, color: '#000000', fontSize: '22px', // animation shake: false, beat: false, rotate: false, } IosNutritionOutline.propTypes = { // style style: PropTypes.object, color: PropTypes.string, fontSize: PropTypes.string, // animation shake: PropTypes.bool, beat: PropTypes.bool, rotate: PropTypes.bool, // functions onClick: PropTypes.func } export default IosNutritionOutline