Skip to content

Commit

Permalink
Merge pull request #70 from jbothma/default-args
Browse files Browse the repository at this point in the history
defaultProps is unsupported. Switch to arguments defaults.
  • Loading branch information
ismamz authored Dec 2, 2024
2 parents fec4547 + 5ba33ee commit e5d0a03
Show file tree
Hide file tree
Showing 2,051 changed files with 25,613 additions and 25,066 deletions.
15 changes: 7 additions & 8 deletions bin/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,13 @@ fs.readdirSync(iconsDir).forEach(file => {
import React, { forwardRef } from 'react';
import PropTypes from 'prop-types';
const ${ComponentName} = forwardRef(({ color, size, title, className, ...rest }, ref) => {
const ${ComponentName} = forwardRef(({
color = 'currentColor',
size = '1em',
title = null,
className = '',
...rest
}, ref) => {
return (
<svg
ref={ref}
Expand All @@ -71,13 +77,6 @@ fs.readdirSync(iconsDir).forEach(file => {
className: PropTypes.string,
};
${ComponentName}.defaultProps = {
color: 'currentColor',
size: '1em',
title: null,
className: '',
};
export default ${ComponentName};
`;

Expand Down
20 changes: 10 additions & 10 deletions src/icons/0-circle-fill.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ import React, { forwardRef } from 'react';
import PropTypes from 'prop-types';

const Icon0CircleFill = forwardRef(
({
color, size, title, className, ...rest
}, ref) => {
(
{
color = 'currentColor',
size = '1em',
title = null,
className = '',
...rest
},
ref,
) => {
return (
<svg
ref={ref}
Expand Down Expand Up @@ -34,11 +41,4 @@ Icon0CircleFill.propTypes = {
className: PropTypes.string,
};

Icon0CircleFill.defaultProps = {
color: 'currentColor',
size: '1em',
title: null,
className: '',
};

export default Icon0CircleFill;
20 changes: 10 additions & 10 deletions src/icons/0-circle.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ import React, { forwardRef } from 'react';
import PropTypes from 'prop-types';

const Icon0Circle = forwardRef(
({
color, size, title, className, ...rest
}, ref) => {
(
{
color = 'currentColor',
size = '1em',
title = null,
className = '',
...rest
},
ref,
) => {
return (
<svg
ref={ref}
Expand Down Expand Up @@ -32,11 +39,4 @@ Icon0Circle.propTypes = {
className: PropTypes.string,
};

Icon0Circle.defaultProps = {
color: 'currentColor',
size: '1em',
title: null,
className: '',
};

export default Icon0Circle;
20 changes: 10 additions & 10 deletions src/icons/0-square-fill.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ import React, { forwardRef } from 'react';
import PropTypes from 'prop-types';

const Icon0SquareFill = forwardRef(
({
color, size, title, className, ...rest
}, ref) => {
(
{
color = 'currentColor',
size = '1em',
title = null,
className = '',
...rest
},
ref,
) => {
return (
<svg
ref={ref}
Expand Down Expand Up @@ -34,11 +41,4 @@ Icon0SquareFill.propTypes = {
className: PropTypes.string,
};

Icon0SquareFill.defaultProps = {
color: 'currentColor',
size: '1em',
title: null,
className: '',
};

export default Icon0SquareFill;
20 changes: 10 additions & 10 deletions src/icons/0-square.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ import React, { forwardRef } from 'react';
import PropTypes from 'prop-types';

const Icon0Square = forwardRef(
({
color, size, title, className, ...rest
}, ref) => {
(
{
color = 'currentColor',
size = '1em',
title = null,
className = '',
...rest
},
ref,
) => {
return (
<svg
ref={ref}
Expand Down Expand Up @@ -32,11 +39,4 @@ Icon0Square.propTypes = {
className: PropTypes.string,
};

Icon0Square.defaultProps = {
color: 'currentColor',
size: '1em',
title: null,
className: '',
};

export default Icon0Square;
20 changes: 10 additions & 10 deletions src/icons/1-circle-fill.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ import React, { forwardRef } from 'react';
import PropTypes from 'prop-types';

const Icon1CircleFill = forwardRef(
({
color, size, title, className, ...rest
}, ref) => {
(
{
color = 'currentColor',
size = '1em',
title = null,
className = '',
...rest
},
ref,
) => {
return (
<svg
ref={ref}
Expand Down Expand Up @@ -33,11 +40,4 @@ Icon1CircleFill.propTypes = {
className: PropTypes.string,
};

Icon1CircleFill.defaultProps = {
color: 'currentColor',
size: '1em',
title: null,
className: '',
};

export default Icon1CircleFill;
20 changes: 10 additions & 10 deletions src/icons/1-circle.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ import React, { forwardRef } from 'react';
import PropTypes from 'prop-types';

const Icon1Circle = forwardRef(
({
color, size, title, className, ...rest
}, ref) => {
(
{
color = 'currentColor',
size = '1em',
title = null,
className = '',
...rest
},
ref,
) => {
return (
<svg
ref={ref}
Expand All @@ -31,11 +38,4 @@ Icon1Circle.propTypes = {
className: PropTypes.string,
};

Icon1Circle.defaultProps = {
color: 'currentColor',
size: '1em',
title: null,
className: '',
};

export default Icon1Circle;
20 changes: 10 additions & 10 deletions src/icons/1-square-fill.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ import React, { forwardRef } from 'react';
import PropTypes from 'prop-types';

const Icon1SquareFill = forwardRef(
({
color, size, title, className, ...rest
}, ref) => {
(
{
color = 'currentColor',
size = '1em',
title = null,
className = '',
...rest
},
ref,
) => {
return (
<svg
ref={ref}
Expand Down Expand Up @@ -33,11 +40,4 @@ Icon1SquareFill.propTypes = {
className: PropTypes.string,
};

Icon1SquareFill.defaultProps = {
color: 'currentColor',
size: '1em',
title: null,
className: '',
};

export default Icon1SquareFill;
20 changes: 10 additions & 10 deletions src/icons/1-square.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ import React, { forwardRef } from 'react';
import PropTypes from 'prop-types';

const Icon1Square = forwardRef(
({
color, size, title, className, ...rest
}, ref) => {
(
{
color = 'currentColor',
size = '1em',
title = null,
className = '',
...rest
},
ref,
) => {
return (
<svg
ref={ref}
Expand Down Expand Up @@ -32,11 +39,4 @@ Icon1Square.propTypes = {
className: PropTypes.string,
};

Icon1Square.defaultProps = {
color: 'currentColor',
size: '1em',
title: null,
className: '',
};

export default Icon1Square;
20 changes: 10 additions & 10 deletions src/icons/123.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ import React, { forwardRef } from 'react';
import PropTypes from 'prop-types';

const Icon123 = forwardRef(
({
color, size, title, className, ...rest
}, ref) => {
(
{
color = 'currentColor',
size = '1em',
title = null,
className = '',
...rest
},
ref,
) => {
return (
<svg
ref={ref}
Expand All @@ -31,11 +38,4 @@ Icon123.propTypes = {
className: PropTypes.string,
};

Icon123.defaultProps = {
color: 'currentColor',
size: '1em',
title: null,
className: '',
};

export default Icon123;
20 changes: 10 additions & 10 deletions src/icons/2-circle-fill.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ import React, { forwardRef } from 'react';
import PropTypes from 'prop-types';

const Icon2CircleFill = forwardRef(
({
color, size, title, className, ...rest
}, ref) => {
(
{
color = 'currentColor',
size = '1em',
title = null,
className = '',
...rest
},
ref,
) => {
return (
<svg
ref={ref}
Expand Down Expand Up @@ -33,11 +40,4 @@ Icon2CircleFill.propTypes = {
className: PropTypes.string,
};

Icon2CircleFill.defaultProps = {
color: 'currentColor',
size: '1em',
title: null,
className: '',
};

export default Icon2CircleFill;
20 changes: 10 additions & 10 deletions src/icons/2-circle.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ import React, { forwardRef } from 'react';
import PropTypes from 'prop-types';

const Icon2Circle = forwardRef(
({
color, size, title, className, ...rest
}, ref) => {
(
{
color = 'currentColor',
size = '1em',
title = null,
className = '',
...rest
},
ref,
) => {
return (
<svg
ref={ref}
Expand All @@ -31,11 +38,4 @@ Icon2Circle.propTypes = {
className: PropTypes.string,
};

Icon2Circle.defaultProps = {
color: 'currentColor',
size: '1em',
title: null,
className: '',
};

export default Icon2Circle;
Loading

0 comments on commit e5d0a03

Please sign in to comment.