Skip to content

Commit

Permalink
Merge pull request #17
Browse files Browse the repository at this point in the history
Update Icons package
  • Loading branch information
yogyy authored Nov 17, 2024
2 parents 3430567 + 382e054 commit cef7398
Show file tree
Hide file tree
Showing 21 changed files with 501 additions and 258 deletions.
5 changes: 0 additions & 5 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ const nextConfig = {
domains: ['res.cloudinary.com', 'i.scdn.co'],
unoptimized: true,
},
modularizeImports: {
'react-icons': {
transform: 'react-icons/{{member}}',
},
},
transpilePackages: ['geist'],

typescript: { ignoreBuildErrors: true },
Expand Down
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"contentlayer": "^0.3.4",
"framer-motion": "^10.18.0",
"geist": "^1.2.1",
"lucide-react": "^0.456.0",
"mdast-util-toc": "^7.0.0",
"next": "^13.4.7",
"next-contentlayer": "^0.3.4",
Expand All @@ -38,7 +39,6 @@
"posthog-node": "^4.0.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-icons": "^4.11.0",
"react-intersection-observer": "^9.5.2",
"rehype-autolink-headings": "^6.1.1",
"rehype-pretty-code": "^0.10.0",
Expand Down
36 changes: 17 additions & 19 deletions src/components/custom-icons.tsx
Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@
import {
SiHeadlessui,
SiMongodb,
SiNextdotjs,
SiRadixui,
SiReact,
SiReactquery,
SiTailwindcss,
SiTrpc,
SiUpstash,
} from 'react-icons/si';
Mongodb,
Nextdotjs,
Radixui,
React,
Reactquery,
Tailwindcss,
Upstash,
} from './icons/simple-icons';

const Icons: { [key: string]: React.ComponentType } = {
NextJS: SiNextdotjs,
Tailwind: SiTailwindcss,
HeadlessUI: SiHeadlessui,
ReactJS: SiReact,
RadixUI: SiRadixui,
MongoDB: SiMongodb,
ReactQuery: SiReactquery,
Trpc: SiTrpc,
Upstash: SiUpstash,
NextJS: Nextdotjs,
Tailwind: Tailwindcss,
ReactJS: React,
RadixUI: Radixui,
MongoDB: Mongodb,
ReactQuery: Reactquery,
Upstash: Upstash,
};

interface IconProps extends React.HTMLProps<SVGSVGElement> {
icon: keyof typeof Icons;
}

export const Icon = ({ icon, ...props }: IconProps) => {
const IconComponent = Icons[icon];
return <IconComponent {...props} />;
Expand Down
114 changes: 0 additions & 114 deletions src/components/icons/icons.tsx

This file was deleted.

Loading

0 comments on commit cef7398

Please sign in to comment.