Reputation: 21
How can I add an Url link to the icon?
<Space>
<a href={team.github}>
<GithubOutlined className="teamSocialIcon" />
</a>
<a href={team.linkedin}>
<LinkedinFilled className="teamSocialIcon" />
</a>
</Space>
Upvotes: 1
Views: 11550
Reputation: 31
You can use Button component of Ant Design and change the type to "link".
<Button type="link" href="url://" icon={<Your Icon/>} />
Upvotes: 1
Reputation: 182
You can use Button component of Ant Design and change the type to "text" or "link".
<Button type="text" href={team.github}>
<GithubOutlined className="teamSocialIcon" />
</Button>
or
<Button type="text" href={team.github} icon={<GithubOutlined className="teamSocialIcon" />} />
But I usually create a component with these two combined to add more custom functionality.
Upvotes: 3