Skip to content
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.

feat(icons): add co2 icon #523

Merged
merged 2 commits into from
Feb 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions src/components/icon/icons/co2.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import PropTypes from 'prop-types';
import React from 'react';
import Icon from '../icon';

export default function Co2({
stroke,
fill,
strokeWidth,
style: styleProp,
...rest // eslint-disable-line comma-dangle
}) {
const style = {
...styleProp,
...Icon.defaultProps.style,
};
return (
<svg style={style} {...rest}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a better way to do this in the future instead of 35 copy pasted lines of code

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok :)

<g stroke={stroke} strokeWidth={0.1} fill={fill}>
<path
d="M0.930308177,8.44440689 C4.60669905,4.09790343 10.1057958,4.30868804 10.1057958,4.30868804 C10.1057958,4.30868804 2.31066754,6.97738765 0.0211893194,12.3289085 C-0.159621672,12.7513696 0.869541386,13.3007772 1.10441695,12.8013158 C1.80546912,11.3130397 2.78235487,10.1968326 2.78235487,10.1968326 C4.22362996,10.7321185 6.71685566,11.3594183 8.48400757,10.1183459 C10.8312738,8.46967725 10.5913344,4.81498731 13.9421463,3.03550739 C14.7248166,2.6200328 7.37412,0.882769259 3.51527982,3.11771042 C0.668921612,4.76608172 0.832306832,7.45098409 0.930308177,8.44440689 Z"
id="Shape"
/>
</g>
</svg>
);
}

Co2.propTypes = {
...Icon.propTypes,
stroke: PropTypes.string,
fill: PropTypes.string,
strokeWidth: PropTypes.number,
};

Co2.defaultProps = Icon.defaultProps;
2 changes: 2 additions & 0 deletions src/components/icon/icons/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import CircleSlash from './circleSlash';
import Clock from './clock';
import Close from './close';
import Cloud from './cloud';
import Co2 from './co2';
import Drop from './drop';
import Edit from './edit';
import Ellipse from './ellipse';
Expand Down Expand Up @@ -116,6 +117,7 @@ const Icon = {
Clock,
Close,
Cloud,
Co2,
Drop,
Edit,
Ellipse,
Expand Down