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 href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />
<section class="mail-seccess section">
<div class="container">
<div class="row">
<div class="col-lg-6 offset-lg-3 col-12">
<div class="success-inner">
<h1><i class="fa fa-envelope"></i><span>Your Mail Sent Successfully!</span></h1>
<p>Aenean eget sollicitudin lorem, et pretium felis. Nullam euismod diam libero, sed dapibus leo laoreet ut. Suspendisse potenti. Phasellus urna lacus</p>
<a href="#/" class="btn btn-primary btn-lg">Go Home</a>
</div>
</div>
</div>
</div>
</section>
</div>
);
}
export default App;
4. Now we need to add below code into our my-awesome-project/src/App.css file :
body{margin-top:20px;}
.mail-seccess {
text-align: center;
background: #fff;
border-top: 1px solid #eee;
}
.mail-seccess .success-inner {
display: inline-block;
}
.mail-seccess .success-inner h1 {
font-size: 100px;
text-shadow: 3px 5px 2px #3333;
color: #006DFE;
font-weight: 700;
}
.mail-seccess .success-inner h1 span {
display: block;
font-size: 25px;
color: #333;
font-weight: 600;
text-shadow: none;
margin-top: 20px;
}
.mail-seccess .success-inner p {
padding: 20px 15px;
}
.mail-seccess .success-inner .btn{
color:#fff;
}