Skip to content

Commit 8b25439

Browse files
authored
Convert all the css into tailwind css of SocialMedia component (#1742)
1 parent 3de7360 commit 8b25439

File tree

9 files changed

+16
-38
lines changed

9 files changed

+16
-38
lines changed

components/SocialMedia/SocialMedia.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,40 +6,39 @@ import YouTubeLogo from 'static/images/icons/youtube_logo.svg';
66
import LinkedInLogo from 'static/images/icons/linkedin_logo_circle.svg';
77
import SocialMediaContainer from './SocialMediaContainer/SocialMediaContainer';
88
import SocialMediaItem from './SocialMediaItem/SocialMediaItem';
9-
import styles from './SocialMedia.module.css';
109

1110
function SocialMedia() {
1211
return (
1312
<SocialMediaContainer>
1413
<SocialMediaItem
1514
href="https://facebook.com/operationcode.org"
1615
name="Facebook"
17-
svg={<FacebookLogo className={styles.logo} />}
16+
svg={<FacebookLogo className="fill-white w-6" />}
1817
/>
1918
<SocialMediaItem
2019
href="https://twitter.com/operation_code"
2120
name="Twitter"
22-
svg={<TwitterLogo className={styles.logo} />}
21+
svg={<TwitterLogo className="fill-white w-6" />}
2322
/>
2423
<SocialMediaItem
2524
href="https://www.instagram.com/operation_code/"
2625
name="Instagram"
27-
svg={<InstagramLogo className={styles.logo} />}
26+
svg={<InstagramLogo className="fill-white w-6" />}
2827
/>
2928
<SocialMediaItem
3029
href="https://www.youtube.com/channel/UCAoJt4a_KEBmgXfoQUrNbSA"
3130
name="YouTube"
32-
svg={<YouTubeLogo className={styles.logo} />}
31+
svg={<YouTubeLogo className="fill-white w-6" />}
3332
/>
3433
<SocialMediaItem
3534
href="https://www.linkedin.com/company/operationcode/"
3635
name="LinkedIn"
37-
svg={<LinkedInLogo className={styles.logo} />}
36+
svg={<LinkedInLogo className="fill-white w-6" />}
3837
/>
3938
<SocialMediaItem
4039
href="https://github.com/OperationCode/"
4140
name="GitHub"
42-
svg={<GitHubLogo className={styles.logo} />}
41+
svg={<GitHubLogo className="fill-white w-6" />}
4342
/>
4443
</SocialMediaContainer>
4544
);

components/SocialMedia/SocialMedia.module.css

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import { arrayOf, element } from 'prop-types';
2-
import styles from './SocialMediaContainer.module.css';
32

43
SocialMediaContainer.propTypes = { children: arrayOf(element).isRequired };
54

65
function SocialMediaContainer({ children }) {
7-
return <div className={styles.SocialMediaContainer}>{children}</div>;
6+
return <div className="flex flex-row justify-around items-center">{children}</div>;
87
}
98

109
export default SocialMediaContainer;

components/SocialMedia/SocialMediaContainer/SocialMediaContainer.module.css

Lines changed: 0 additions & 6 deletions
This file was deleted.

components/SocialMedia/SocialMediaContainer/__tests__/__snapshots__/SocialMediaContainer.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`SocialMediaContainer should render with required props 1`] = `
44
<div
5-
className="SocialMediaContainer"
5+
className="flex flex-row justify-around items-center"
66
>
77
<div>
88
Testing 1

components/SocialMedia/SocialMediaItem/SocialMediaItem.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { node, string } from 'prop-types';
22
import OutboundLink from 'components/OutboundLink/OutboundLink';
33
import ScreenReaderOnly from 'components/ScreenReaderOnly/ScreenReaderOnly';
4-
import styles from './SocialMediaItem.module.css';
54

65
SocialMediaItem.propTypes = {
76
name: string.isRequired,
@@ -11,7 +10,7 @@ SocialMediaItem.propTypes = {
1110

1211
function SocialMediaItem({ name, href, svg }) {
1312
return (
14-
<div className={styles.SocialMediaItem}>
13+
<div className="my-0 mx-2 opacity-80 hover:opacity-100">
1514
<OutboundLink
1615
analyticsEventLabel={`Social Media Engagement: ${name}`}
1716
hasIcon={false}

components/SocialMedia/SocialMediaItem/SocialMediaItem.module.css

Lines changed: 0 additions & 8 deletions
This file was deleted.

components/SocialMedia/SocialMediaItem/__tests__/__snapshots__/SocialMediaItem.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`SocialMediaItem should render with required props 1`] = `
44
<div
5-
className="SocialMediaItem"
5+
className="my-0 mx-2 opacity-80 hover:opacity-100"
66
>
77
<a
88
className="OutboundLink"

components/SocialMedia/__tests__/__snapshots__/SocialMedia.test.js.snap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ exports[`SocialMedia should render with no props passed passed 1`] = `
77
name="Facebook"
88
svg={
99
<Svg
10-
className="logo"
10+
className="fill-white w-6"
1111
/>
1212
}
1313
/>
@@ -16,7 +16,7 @@ exports[`SocialMedia should render with no props passed passed 1`] = `
1616
name="Twitter"
1717
svg={
1818
<Svg
19-
className="logo"
19+
className="fill-white w-6"
2020
/>
2121
}
2222
/>
@@ -25,7 +25,7 @@ exports[`SocialMedia should render with no props passed passed 1`] = `
2525
name="Instagram"
2626
svg={
2727
<Svg
28-
className="logo"
28+
className="fill-white w-6"
2929
/>
3030
}
3131
/>
@@ -34,7 +34,7 @@ exports[`SocialMedia should render with no props passed passed 1`] = `
3434
name="YouTube"
3535
svg={
3636
<Svg
37-
className="logo"
37+
className="fill-white w-6"
3838
/>
3939
}
4040
/>
@@ -43,7 +43,7 @@ exports[`SocialMedia should render with no props passed passed 1`] = `
4343
name="LinkedIn"
4444
svg={
4545
<Svg
46-
className="logo"
46+
className="fill-white w-6"
4747
/>
4848
}
4949
/>
@@ -52,7 +52,7 @@ exports[`SocialMedia should render with no props passed passed 1`] = `
5252
name="GitHub"
5353
svg={
5454
<Svg
55-
className="logo"
55+
className="fill-white w-6"
5656
/>
5757
}
5858
/>

0 commit comments

Comments
 (0)