Skip to content
This repository was archived by the owner on Mar 1, 2024. It is now read-only.

Commit e7e9f3a

Browse files
committed
feat(mediabodysocial): add tooltip to media icons
this adds a new tooltip to all media icons in the media body component #114
1 parent 90dca54 commit e7e9f3a

File tree

1 file changed

+21
-13
lines changed

1 file changed

+21
-13
lines changed

src/components/Media/MediaBodySocial.react.js

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// @flow
22

33
import * as React from "react";
4-
import { List, Media } from "../../components";
4+
import { List, Media, Tooltip } from "../";
55

66
type Props = {|
77
+children?: React.Node,
@@ -32,39 +32,47 @@ function MediaBodySocial({
3232
if (facebook) {
3333
fbIcon = (
3434
<List.Item className="list-inline-item">
35-
<a href="/Profile">
36-
<i className="fa fa-facebook" />
37-
</a>
35+
<Tooltip content="Facebook" placement="top">
36+
<a href="/Profile">
37+
<i className="fa fa-facebook" />
38+
</a>
39+
</Tooltip>
3840
</List.Item>
3941
);
4042
}
4143

4244
if (twitter) {
4345
twitterIcon = (
4446
<List.Item className="list-inline-item">
45-
<a href="/Profile" data-original-title="Twitter">
46-
<i className="fa fa-twitter" />
47-
</a>
47+
<Tooltip content="Twitter" placement="top">
48+
<a href="/Profile">
49+
<i className="fa fa-twitter" />
50+
</a>
51+
</Tooltip>
4852
</List.Item>
4953
);
5054
}
5155

5256
if (phone) {
5357
phoneIcon = (
5458
<List.Item className="list-inline-item">
55-
<a href="/Profile" data-original-title="1234567890">
56-
<i className="fa fa-phone" />
57-
</a>
59+
<Tooltip content="+1 234-567-8901" placement="top">
60+
<a href="/Profile">
61+
<i className="fa fa-phone" />
62+
</a>
63+
</Tooltip>
5864
</List.Item>
5965
);
6066
}
6167

6268
if (skype) {
6369
skypeIcon = (
6470
<List.Item className="list-inline-item">
65-
<a href="/Profile" data-original-title="@skypename">
66-
<i className="fa fa-skype" />
67-
</a>
71+
<Tooltip content="@skypename" placement="top">
72+
<a href="/Profile">
73+
<i className="fa fa-skype" />
74+
</a>
75+
</Tooltip>
6876
</List.Item>
6977
);
7078
}

0 commit comments

Comments
 (0)