Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Adds children prop to all icons #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
5 changes: 4 additions & 1 deletion src/icons/activity.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';

const Activity = props => {
const { color, size, ...otherProps } = props;
const { children, color, size, ...otherProps } = props;
return (
<svg
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -16,17 +16,20 @@ const Activity = props => {
strokeLinejoin="round"
{...otherProps}
>
{children}
<polyline points="22 12 18 12 15 21 9 3 6 12 2 12" />
</svg>
);
};

Activity.propTypes = {
children: PropTypes.object,
color: PropTypes.string,
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
};

Activity.defaultProps = {
children: null,
color: 'currentColor',
size: '24',
};
Expand Down
5 changes: 4 additions & 1 deletion src/icons/airplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';

const Airplay = props => {
const { color, size, ...otherProps } = props;
const { children, color, size, ...otherProps } = props;
return (
<svg
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -16,18 +16,21 @@ const Airplay = props => {
strokeLinejoin="round"
{...otherProps}
>
{children}
<path d="M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1" />
<polygon points="12 15 17 21 7 21 12 15" />
</svg>
);
};

Airplay.propTypes = {
children: PropTypes.object,
color: PropTypes.string,
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
};

Airplay.defaultProps = {
children: null,
color: 'currentColor',
size: '24',
};
Expand Down
5 changes: 4 additions & 1 deletion src/icons/alert-circle.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';

const AlertCircle = props => {
const { color, size, ...otherProps } = props;
const { children, color, size, ...otherProps } = props;
return (
<svg
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -16,6 +16,7 @@ const AlertCircle = props => {
strokeLinejoin="round"
{...otherProps}
>
{children}
<circle cx="12" cy="12" r="10" />
<line x1="12" y1="8" x2="12" y2="12" />
<line x1="12" y1="16" x2="12" y2="16" />
Expand All @@ -24,11 +25,13 @@ const AlertCircle = props => {
};

AlertCircle.propTypes = {
children: PropTypes.object,
color: PropTypes.string,
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
};

AlertCircle.defaultProps = {
children: null,
color: 'currentColor',
size: '24',
};
Expand Down
5 changes: 4 additions & 1 deletion src/icons/alert-octagon.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';

const AlertOctagon = props => {
const { color, size, ...otherProps } = props;
const { children, color, size, ...otherProps } = props;
return (
<svg
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -16,6 +16,7 @@ const AlertOctagon = props => {
strokeLinejoin="round"
{...otherProps}
>
{children}
<polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2" />
<line x1="12" y1="8" x2="12" y2="12" />
<line x1="12" y1="16" x2="12" y2="16" />
Expand All @@ -24,11 +25,13 @@ const AlertOctagon = props => {
};

AlertOctagon.propTypes = {
children: PropTypes.object,
color: PropTypes.string,
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
};

AlertOctagon.defaultProps = {
children: null,
color: 'currentColor',
size: '24',
};
Expand Down
5 changes: 4 additions & 1 deletion src/icons/alert-triangle.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';

const AlertTriangle = props => {
const { color, size, ...otherProps } = props;
const { children, color, size, ...otherProps } = props;
return (
<svg
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -16,6 +16,7 @@ const AlertTriangle = props => {
strokeLinejoin="round"
{...otherProps}
>
{children}
<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" />
<line x1="12" y1="9" x2="12" y2="13" />
<line x1="12" y1="17" x2="12" y2="17" />
Expand All @@ -24,11 +25,13 @@ const AlertTriangle = props => {
};

AlertTriangle.propTypes = {
children: PropTypes.object,
color: PropTypes.string,
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
};

AlertTriangle.defaultProps = {
children: null,
color: 'currentColor',
size: '24',
};
Expand Down
5 changes: 4 additions & 1 deletion src/icons/align-center.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';

const AlignCenter = props => {
const { color, size, ...otherProps } = props;
const { children, color, size, ...otherProps } = props;
return (
<svg
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -16,6 +16,7 @@ const AlignCenter = props => {
strokeLinejoin="round"
{...otherProps}
>
{children}
<line x1="18" y1="10" x2="6" y2="10" />
<line x1="21" y1="6" x2="3" y2="6" />
<line x1="21" y1="14" x2="3" y2="14" />
Expand All @@ -25,11 +26,13 @@ const AlignCenter = props => {
};

AlignCenter.propTypes = {
children: PropTypes.object,
color: PropTypes.string,
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
};

AlignCenter.defaultProps = {
children: null,
color: 'currentColor',
size: '24',
};
Expand Down
5 changes: 4 additions & 1 deletion src/icons/align-justify.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';

const AlignJustify = props => {
const { color, size, ...otherProps } = props;
const { children, color, size, ...otherProps } = props;
return (
<svg
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -16,6 +16,7 @@ const AlignJustify = props => {
strokeLinejoin="round"
{...otherProps}
>
{children}
<line x1="21" y1="10" x2="3" y2="10" />
<line x1="21" y1="6" x2="3" y2="6" />
<line x1="21" y1="14" x2="3" y2="14" />
Expand All @@ -25,11 +26,13 @@ const AlignJustify = props => {
};

AlignJustify.propTypes = {
children: PropTypes.object,
color: PropTypes.string,
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
};

AlignJustify.defaultProps = {
children: null,
color: 'currentColor',
size: '24',
};
Expand Down
5 changes: 4 additions & 1 deletion src/icons/align-left.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';

const AlignLeft = props => {
const { color, size, ...otherProps } = props;
const { children, color, size, ...otherProps } = props;
return (
<svg
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -16,6 +16,7 @@ const AlignLeft = props => {
strokeLinejoin="round"
{...otherProps}
>
{children}
<line x1="17" y1="10" x2="3" y2="10" />
<line x1="21" y1="6" x2="3" y2="6" />
<line x1="21" y1="14" x2="3" y2="14" />
Expand All @@ -25,11 +26,13 @@ const AlignLeft = props => {
};

AlignLeft.propTypes = {
children: PropTypes.object,
color: PropTypes.string,
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
};

AlignLeft.defaultProps = {
children: null,
color: 'currentColor',
size: '24',
};
Expand Down
5 changes: 4 additions & 1 deletion src/icons/align-right.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';

const AlignRight = props => {
const { color, size, ...otherProps } = props;
const { children, color, size, ...otherProps } = props;
return (
<svg
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -16,6 +16,7 @@ const AlignRight = props => {
strokeLinejoin="round"
{...otherProps}
>
{children}
<line x1="21" y1="10" x2="7" y2="10" />
<line x1="21" y1="6" x2="3" y2="6" />
<line x1="21" y1="14" x2="3" y2="14" />
Expand All @@ -25,11 +26,13 @@ const AlignRight = props => {
};

AlignRight.propTypes = {
children: PropTypes.object,
color: PropTypes.string,
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
};

AlignRight.defaultProps = {
children: null,
color: 'currentColor',
size: '24',
};
Expand Down
5 changes: 4 additions & 1 deletion src/icons/anchor.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';

const Anchor = props => {
const { color, size, ...otherProps } = props;
const { children, color, size, ...otherProps } = props;
return (
<svg
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -16,6 +16,7 @@ const Anchor = props => {
strokeLinejoin="round"
{...otherProps}
>
{children}
<circle cx="12" cy="5" r="3" />
<line x1="12" y1="22" x2="12" y2="8" />
<path d="M5 12H2a10 10 0 0 0 20 0h-3" />
Expand All @@ -24,11 +25,13 @@ const Anchor = props => {
};

Anchor.propTypes = {
children: PropTypes.object,
color: PropTypes.string,
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
};

Anchor.defaultProps = {
children: null,
color: 'currentColor',
size: '24',
};
Expand Down
5 changes: 4 additions & 1 deletion src/icons/aperture.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';

const Aperture = props => {
const { color, size, ...otherProps } = props;
const { children, color, size, ...otherProps } = props;
return (
<svg
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -16,6 +16,7 @@ const Aperture = props => {
strokeLinejoin="round"
{...otherProps}
>
{children}
<circle cx="12" cy="12" r="10" />
<line x1="14.31" y1="8" x2="20.05" y2="17.94" />
<line x1="9.69" y1="8" x2="21.17" y2="8" />
Expand All @@ -28,11 +29,13 @@ const Aperture = props => {
};

Aperture.propTypes = {
children: PropTypes.object,
color: PropTypes.string,
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
};

Aperture.defaultProps = {
children: null,
color: 'currentColor',
size: '24',
};
Expand Down
5 changes: 4 additions & 1 deletion src/icons/arrow-down-circle.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';

const ArrowDownCircle = props => {
const { color, size, ...otherProps } = props;
const { children, color, size, ...otherProps } = props;
return (
<svg
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -16,6 +16,7 @@ const ArrowDownCircle = props => {
strokeLinejoin="round"
{...otherProps}
>
{children}
<circle cx="12" cy="12" r="10" />
<polyline points="8 12 12 16 16 12" />
<line x1="12" y1="8" x2="12" y2="16" />
Expand All @@ -24,11 +25,13 @@ const ArrowDownCircle = props => {
};

ArrowDownCircle.propTypes = {
children: PropTypes.object,
color: PropTypes.string,
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
};

ArrowDownCircle.defaultProps = {
children: null,
color: 'currentColor',
size: '24',
};
Expand Down
Loading