From b86d799fb1900378b6d586a7b0f069a4ff39be15 Mon Sep 17 00:00:00 2001 From: Pontus Dreij Date: Wed, 28 Aug 2024 08:58:04 +0200 Subject: [PATCH] feat(SW-185): Moved types to types folder --- components/Footer/Details/index.tsx | 3 ++- types/components/footer/socialIcons.ts | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 types/components/footer/socialIcons.ts diff --git a/components/Footer/Details/index.tsx b/components/Footer/Details/index.tsx index 7d0961527..89a3bb16e 100644 --- a/components/Footer/Details/index.tsx +++ b/components/Footer/Details/index.tsx @@ -9,9 +9,10 @@ import { footer } from "../mockedData" import styles from "./details.module.css" +import type { SocialIconsProps } from "@/types/components/footer/socialIcons" import { IconName } from "@/types/components/icon" -function SocialIcon({ iconName }: { iconName: string }) { +function SocialIcon({ iconName }: SocialIconsProps) { const SocialIcon = getIconByIconName(iconName as IconName) return SocialIcon ? : {iconName} } diff --git a/types/components/footer/socialIcons.ts b/types/components/footer/socialIcons.ts new file mode 100644 index 000000000..83c7b82ba --- /dev/null +++ b/types/components/footer/socialIcons.ts @@ -0,0 +1,3 @@ +export type SocialIconsProps = { + iconName: string +}