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

refactor: icons to function components #195

Merged
merged 1 commit into from
Sep 21, 2024
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
6 changes: 3 additions & 3 deletions src/components/icons/icon-bits.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { SVGAttributes } from 'react';

export const IconBits: React.FC<React.SVGAttributes<SVGSVGElement>> = props => {
export function IconBits(props: SVGAttributes<SVGSVGElement>) {
return (
<svg viewBox="0 0 21 22" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
<g clipPath="url(#clip0_3632_581)">
Expand All @@ -21,4 +21,4 @@ export const IconBits: React.FC<React.SVGAttributes<SVGSVGElement>> = props => {
</defs>
</svg>
);
};
}
6 changes: 3 additions & 3 deletions src/components/icons/icon-chart.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { SVGAttributes } from 'react';

export const IconChart: React.FC<React.SVGAttributes<SVGSVGElement>> = props => {
export function IconChart(props: SVGAttributes<SVGSVGElement>) {
return (
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
<path
Expand All @@ -9,4 +9,4 @@ export const IconChart: React.FC<React.SVGAttributes<SVGSVGElement>> = props =>
/>
</svg>
);
};
}
19 changes: 4 additions & 15 deletions src/components/icons/icon-dollar-sign.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
import * as React from 'react';
import { SVGAttributes } from 'react';

export const IconDollarSign: React.FC<React.SVGAttributes<SVGSVGElement>> = ({
width = 24,
height = 24,
...rest
}) => {
export function IconDollarSign(props: SVGAttributes<SVGSVGElement>) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 20 20"
fill="currentColor"
width={width}
height={height}
{...rest}
>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" {...props}>
<path d="M8.433 7.418c.155-.103.346-.196.567-.267v1.698a2.305 2.305 0 01-.567-.267C8.07 8.34 8 8.114 8 8c0-.114.07-.34.433-.582zM11 12.849v-1.698c.22.071.412.164.567.267.364.243.433.468.433.582 0 .114-.07.34-.433.582a2.305 2.305 0 01-.567.267z" />
<path
fillRule="evenodd"
Expand All @@ -22,4 +11,4 @@ export const IconDollarSign: React.FC<React.SVGAttributes<SVGSVGElement>> = ({
/>
</svg>
);
};
}
6 changes: 3 additions & 3 deletions src/components/icons/icon-exclamation-mark.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { SVGAttributes } from 'react';

export const IconExclamationMark: React.FC<React.SVGAttributes<SVGSVGElement>> = props => {
export function IconExclamationMark(props: SVGAttributes<SVGSVGElement>) {
return (
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
<path
Expand All @@ -9,4 +9,4 @@ export const IconExclamationMark: React.FC<React.SVGAttributes<SVGSVGElement>> =
/>
</svg>
);
};
}
6 changes: 3 additions & 3 deletions src/components/icons/icon-follow.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { SVGAttributes } from 'react';

export const IconFollow: React.FC<React.SVGAttributes<SVGSVGElement>> = props => {
export function IconFollow(props: SVGAttributes<SVGSVGElement>) {
return (
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
<path
Expand All @@ -9,4 +9,4 @@ export const IconFollow: React.FC<React.SVGAttributes<SVGSVGElement>> = props =>
/>
</svg>
);
};
}
6 changes: 3 additions & 3 deletions src/components/icons/icon-heart.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { SVGAttributes } from 'react';

export const IconHeart: React.FC<React.SVGAttributes<SVGSVGElement>> = props => {
export function IconHeart(props: SVGAttributes<SVGSVGElement>) {
return (
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
<path
Expand All @@ -9,4 +9,4 @@ export const IconHeart: React.FC<React.SVGAttributes<SVGSVGElement>> = props =>
/>
</svg>
);
};
}
6 changes: 3 additions & 3 deletions src/components/icons/icon-money.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { SVGAttributes } from 'react';

export const IconMoney: React.FC<React.SVGAttributes<SVGSVGElement>> = props => {
export function IconMoney(props: SVGAttributes<SVGSVGElement>) {
return (
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
<path
Expand All @@ -9,4 +9,4 @@ export const IconMoney: React.FC<React.SVGAttributes<SVGSVGElement>> = props =>
/>
</svg>
);
};
}
10 changes: 3 additions & 7 deletions src/components/icons/icon-star.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import * as React from 'react';
import { SVGAttributes } from 'react';

export const IconStar: React.FC<React.SVGAttributes<SVGSVGElement>> = ({
width = 24,
height = 24,
...rest
}) => {
export function IconStar({ width = 24, height = 24, ...rest }: SVGAttributes<SVGSVGElement>) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -17,4 +13,4 @@ export const IconStar: React.FC<React.SVGAttributes<SVGSVGElement>> = ({
<path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" />
</svg>
);
};
}
6 changes: 3 additions & 3 deletions src/components/icons/icon-tv.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { SVGAttributes } from 'react';

export const IconTV: React.FC<React.SVGAttributes<SVGSVGElement>> = props => {
export function IconTV(props: SVGAttributes<SVGSVGElement>) {
return (
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
<path
Expand All @@ -9,4 +9,4 @@ export const IconTV: React.FC<React.SVGAttributes<SVGSVGElement>> = props => {
/>
</svg>
);
};
}
Loading