diff --git a/src/components/atoms/IconLinks/IconLinks.tsx b/src/components/atoms/IconLinks/IconLinks.tsx index 5aa2f2e..3781d60 100644 --- a/src/components/atoms/IconLinks/IconLinks.tsx +++ b/src/components/atoms/IconLinks/IconLinks.tsx @@ -1,41 +1,38 @@ -import { Email, LinkedIn, GitHub, Description } from '@mui/icons-material' -import { IconButtonProps } from '@mui/material' +import { Email, LinkedIn, GitHub, Description, OndemandVideo, School } from '@mui/icons-material' +import { Badge, IconButtonProps, SvgIcon } from '@mui/material' import IconButton from '../IconButton' interface IconLinkProps extends IconButtonProps { href: string fontSize?: 'small' | 'large' | 'medium' | 'inherit' + index?: number } -export const DescriptionIconLink = ({ href: to, fontSize, ...props }: IconLinkProps) => { +interface IconWrapperProps extends IconLinkProps { + Icon: typeof SvgIcon +} + +const IconWrapper = ({ index, href: to, fontSize, Icon, ...props }: IconWrapperProps) => { + if (typeof index === 'undefined') { + return ( + window.open(to, '_blank')} {...props}> + + + ) + } return ( - window.open(to, '_blank')} {...props}> - + window.open(to, '_blank')} {...props}> + + + ) } -export const EmailIconLink = ({ href: to, fontSize, ...props }: IconLinkProps) => { - return ( - window.open(to, '_blank')} {...props}> - - - ) -} - -export const GitHubIconLink = ({ href: to, fontSize, ...props }: IconLinkProps) => { - return ( - window.open(to, '_blank')} {...props}> - - - ) -} - -export const LinkedInIconLink = ({ href: to, fontSize, ...props }: IconLinkProps) => { - return ( - window.open(to, '_blank')} {...props}> - - - ) -} +export const DescriptionIconLink = (props: IconLinkProps) => +export const EmailIconLink = (props: IconLinkProps) => +export const GitHubIconLink = (props: IconLinkProps) => +export const LinkedInIconLink = (props: IconLinkProps) => +export const AcademyIconLink = (props: IconLinkProps) => +export const VideoIconLink = (props: IconLinkProps) =>