feat(SW-185): Moved types to types folder
This commit is contained in:
@@ -9,9 +9,10 @@ import { footer } from "../mockedData"
|
|||||||
|
|
||||||
import styles from "./details.module.css"
|
import styles from "./details.module.css"
|
||||||
|
|
||||||
|
import type { SocialIconsProps } from "@/types/components/footer/socialIcons"
|
||||||
import { IconName } from "@/types/components/icon"
|
import { IconName } from "@/types/components/icon"
|
||||||
|
|
||||||
function SocialIcon({ iconName }: { iconName: string }) {
|
function SocialIcon({ iconName }: SocialIconsProps) {
|
||||||
const SocialIcon = getIconByIconName(iconName as IconName)
|
const SocialIcon = getIconByIconName(iconName as IconName)
|
||||||
return SocialIcon ? <SocialIcon color="white" /> : <span>{iconName}</span>
|
return SocialIcon ? <SocialIcon color="white" /> : <span>{iconName}</span>
|
||||||
}
|
}
|
||||||
|
|||||||
3
types/components/footer/socialIcons.ts
Normal file
3
types/components/footer/socialIcons.ts
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
export type SocialIconsProps = {
|
||||||
|
iconName: string
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user