Skip to content

Commit

Permalink
implement icon-set-component
Browse files Browse the repository at this point in the history
  • Loading branch information
Taehoya committed Mar 14, 2024
1 parent ad78cfc commit 35f8c55
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/components/c-icon-set/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { IconType } from 'react-icons';
import * as S from './page.styled';

interface Props {
icons: IconType[];
}

export default function CIConSet({ icons }: Props) {
return (
<S.Container>
{icons.map((IconComponent, index) => (
<S.Icon key={index}>
<IconComponent />
</S.Icon>
))}
</S.Container>
);
}
11 changes: 11 additions & 0 deletions src/components/c-icon-set/page.styled.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import styled from 'styled-components';

export const Container = styled.div`
display: flex;
gap: 10px;
`;

export const Icon = styled.div`
font-size: 26px;
color: #000;
`;
4 changes: 4 additions & 0 deletions src/components/tech-icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import {
SiReact as ReactIcon,
SiTestinglibrary as TestingLibraryIcon,
SiTypescript as TypeScriptIcon,
SiNestjs as NestJsIcon,
SiGo as GoIcon,
} from 'react-icons/si';

const icons: { [key: string]: IconType } = {
Expand All @@ -33,6 +35,8 @@ const icons: { [key: string]: IconType } = {
aws: AwsIcon,
docker: DockerIcon,
okta: OktaIcon,
nest: NestJsIcon,
go: GoIcon,
};

export default icons;

0 comments on commit 35f8c55

Please sign in to comment.