1. First, we need fresh reactjs setup, and for that, we need to run below commands into out terminal, and also we should have latest node version installed on our system:
npx create-react-app my-awesome-project
cd my-awesome-project
npm start
2. Now we need to run below commands into our project terminal to get bootstrap and related modules into our reactjs application:
npm install [email protected] --save
npm start //For start project again
3. Finally for the main output, we need to add below code into our my-awesome-project/src/App.js file or if you have fresh setup then you can replace my-awesome-project/src/App.js file code with below code:
import React from 'react';
import './App.css';
import 'bootstrap/dist/css/bootstrap.min.css';
function App() {
return (
<div>
<link rel="stylesheet" type="text/css" href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css"/>
<div class="container">
<h4><a target="__blank" href="http://www.jquery2dotnet.com/2014/06/awesome-flat-big-social-media-button.html/">jquery2dotnet</a></h4>
<div class="col-md-12">
<div class="row">
<div class="social google-pluse">
<i class="fa fa-google-plus fa-5x"></i>
</div>
<div class="social facebook">
<i class="fa fa-facebook fa-5x"></i>
</div>
<div class="social twitter">
<i class="fa fa-twitter fa-5x"></i>
</div>
<div class="social pinterest">
<i class="fa fa-pinterest fa-5x"></i>
</div>
</div>
<div class="row">
<div class="social linkedin">
<i class="fa fa-linkedin fa-5x"></i>
</div>
<div class="social skype">
<i class="fa fa-skype fa-5x"></i>
</div>
<div class="social youtube">
<i class="fa fa-youtube fa-5x"></i>
</div>
<div class="social tumblr">
<i class="fa fa-tumblr fa-5x"></i>
</div>
</div>
</div>
</div>
</div>
);
}
export default App;
4. Now we need to add below code into our my-awesome-project/src/App.css file :
.social{
text-align:center;
width:120px;
height:120px;
float:left;
background:rgb(255,255,255);
border:1px solid rgb(204,204,204);
box-shadow:0 2px 4px rgba(0,0,0,0.15), inset 0 0 50px rgba(0,0,0,0.1);
border-radius:5px;
margin:0 10px 10px 0;
padding:17px;
}
.google-pluse:hover{background:#DD4B39;color:#FFF;}
.facebook:hover{background:#3b5998;color:#FFF;}
.twitter:hover{background:#00acee;color:#FFF;}
.pinterest:hover{background:#c8232c;color:#FFF;}
.linkedin:hover{background:#0e76a8;color:#FFF;}
.skype:hover{background:#00aff0;color:#FFF;}
.youtube:hover{background:#c4302b;color:#FFF;}
.tumblr:hover{background:#34526f;color:#FFF;}