Seeking expertise in incorporating social media icons with a hover effect to turn purple. Encountering an issue where the entire circle of the icon is mistakenly being painted on hover. Refer to the screenshot of the current outcome and desired result.
Working within a project utilizing Tailwind CSS, I have been using the following class for added images:
className='fill-current hover:fill-primary-500'
. The stroke is also not functioning as intended.
const socials = [
{
icon: (
<IcFB
className='hover:fill-primary-500'
width={40}
height={40}
/>
),
title: 'Facebook',
url: '#',
},
{
icon: (
<IcInstagram
className='hover:fill-primary-500'
width={40}
height={40}
/>
),
title: 'Instagram',
url: '#',
},
]
const Socials: FC = observer(() => {
return (
<div className='flex space-x-4'>
{socials.map((s) => (
<LinkWrapper key={s.url} href={s.url} title={s.title} target='_blank'>
{s.icon}
</LinkWrapper>
))}
</div>
)
})
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.6.3/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.6.3/umd/react-dom.production.min.js"></script>