From 0b1e9cbd5a3f4d4d9a40d2e34265a03e3a175fe0 Mon Sep 17 00:00:00 2001 From: Ando Date: Tue, 22 Apr 2025 10:38:46 +0300 Subject: [PATCH] feat: move to icons component --- components/footer.tsx | 2 +- components/header.tsx | 4 +- components/icons.tsx | 221 +++++++++++++++++++++++++++++++++++ components/icons/discord.tsx | 16 --- components/icons/heart.tsx | 9 -- components/icons/kinotio.tsx | 129 -------------------- 6 files changed, 224 insertions(+), 157 deletions(-) create mode 100644 components/icons.tsx delete mode 100644 components/icons/discord.tsx delete mode 100644 components/icons/heart.tsx delete mode 100644 components/icons/kinotio.tsx diff --git a/components/footer.tsx b/components/footer.tsx index 3c7b24e..6f61165 100644 --- a/components/footer.tsx +++ b/components/footer.tsx @@ -1,4 +1,4 @@ -import { Heart } from '@/components/icons/heart' +import { Heart } from '@/components/icons' export const Footer = () => { return ( diff --git a/components/header.tsx b/components/header.tsx index 703b132..c821556 100644 --- a/components/header.tsx +++ b/components/header.tsx @@ -1,8 +1,8 @@ import Link from 'next/link' import { Github } from 'lucide-react' -import { Kinotio } from '@/components/icons/kinotio' -import { Discord } from '@/components/icons/discord' +import { Kinotio } from '@/components/icons' +import { Discord } from '@/components/icons' import { DATA } from '@/data' diff --git a/components/icons.tsx b/components/icons.tsx new file mode 100644 index 0000000..6fd47d7 --- /dev/null +++ b/components/icons.tsx @@ -0,0 +1,221 @@ +const Icons = { + Kinotio: (props: React.ComponentProps<'svg'>): React.ReactElement => ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + ), + KinotioIcon: (props: React.ComponentProps<'svg'>): React.ReactElement => ( + + + + + + + + ), + Mine: (props: React.ComponentProps<'svg'>): React.ReactElement => ( + + + + + + + + + + + + ), + Heart: (props: React.ComponentProps<'svg'>) => ( + + + + ), + Github: (props: React.ComponentProps<'svg'>) => ( + + + + ), + X: (props: React.ComponentProps<'svg'>) => ( + + + + ), + Slack: (props: React.ComponentProps<'svg'>) => ( + + + + ), + Linkedin: (props: React.ComponentProps<'svg'>) => ( + + + + ), + Discord: (props: React.ComponentProps<'svg'>) => ( + + + + ), + Bluesky: (props: React.ComponentProps<'svg'>) => ( + + + + ), + Facebook: (props: React.ComponentProps<'svg'>) => ( + + + + ), + Whatsapp: (props: React.ComponentProps<'svg'>) => ( + + + + ), + Telegram: (props: React.ComponentProps<'svg'>) => ( + + + + ) +} + +export const { + Kinotio, + KinotioIcon, + Mine, + Heart, + Github, + X, + Slack, + Linkedin, + Discord, + Bluesky, + Facebook, + Whatsapp, + Telegram +} = Icons \ No newline at end of file diff --git a/components/icons/discord.tsx b/components/icons/discord.tsx deleted file mode 100644 index 04b2008..0000000 --- a/components/icons/discord.tsx +++ /dev/null @@ -1,16 +0,0 @@ -export const Discord = ( - props: React.ComponentProps<'svg'> -): React.ReactElement => { - return ( - - - - ) -} diff --git a/components/icons/heart.tsx b/components/icons/heart.tsx deleted file mode 100644 index 6671b67..0000000 --- a/components/icons/heart.tsx +++ /dev/null @@ -1,9 +0,0 @@ -export const Heart = ( - props: React.ComponentProps<'svg'> -): React.ReactElement => { - return ( - - - - ) -} diff --git a/components/icons/kinotio.tsx b/components/icons/kinotio.tsx deleted file mode 100644 index 027fca2..0000000 --- a/components/icons/kinotio.tsx +++ /dev/null @@ -1,129 +0,0 @@ -export const Kinotio = ( - props: React.ComponentProps<'svg'>, -): React.ReactElement => ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -)