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"/>
<div class="container">
<div class="row">
<div class="col-md-5">
<div class="widget widget-reminder">
<div class="widget-reminder-header">TODAY, NOV 4</div>
<div class="widget-reminder-container">
<div class="widget-reminder-time">
09:00<br />
12:00
</div>
<div class="widget-reminder-divider bg-success"></div>
<div class="widget-reminder-content">
<h4 class="widget-title">Meeting with HR</h4>
<div class="widget-desc"><i class="fa fa-map-pin"></i> Conference Room</div>
</div>
</div>
<div class="widget-reminder-container">
<div class="widget-reminder-time">
20:00<br />
23:00
</div>
<div class="widget-reminder-divider bg-primary"></div>
<div class="widget-reminder-content">
<h4 class="widget-title">Dinner with Richard</h4>
<div class="widget-desc"><i class="fa fa-map-pin"></i> Tom's Too Restaurant</div>
<div class="m-t-15">
<a href="#/" class="pull-right">Contact</a>
<img src="https://bootdey.com/img/Content/avatar/avatar1.png" width="16" class="img-circle pull-left m-r-5" alt="" /> Richard Leong
</div>
</div>
</div>
<div class="widget-reminder-header">TOMORROW, NOV 5</div>
<div class="widget-reminder-container">
<div class="widget-reminder-time">All day</div>
<div class="widget-reminder-divider bg-purple"></div>
<div class="widget-reminder-content">
<h4 class="widget-title"><i class="fa fa-gift text-purple"></i> Terry Birthday</h4>
</div>
</div>
<div class="widget-reminder-container">
<div class="widget-reminder-time">
00:00<br />
00:30
</div>
<div class="widget-reminder-divider bg-danger"></div>
<div class="widget-reminder-content">
<h4 class="widget-title">Server Maintenance</h4>
<div class="widget-desc"><i class="ti-pin"></i> Data Centre</div>
</div>
</div>
</div>
</div>
<div class="col-md-5">
<div class="widget widget-reminder">
<div class="widget-reminder-header">TODAY, NOV 5</div>
<div class="widget-reminder-container">
<div class="widget-reminder-time">
09:00<br />
12:00
</div>
<div class="widget-reminder-divider bg-success"></div>
<div class="widget-reminder-content">
<h4 class="widget-title">Meeting with HR</h4>
<div class="widget-desc"><i class="fa fa-map-pin"></i> Conference Room</div>
</div>
</div>
<div class="widget-reminder-container">
<div class="widget-reminder-time">
20:00<br />
23:00
</div>
<div class="widget-reminder-divider bg-primary"></div>
<div class="widget-reminder-content">
<h4 class="widget-title">Dinner with Richard</h4>
<div class="widget-desc"><i class="fa fa-map-pin"></i> Tom's Too Restaurant</div>
<div class="m-t-15">
<a href="#/" class="pull-right">Contact</a>
<img src="https://bootdey.com/img/Content/avatar/avatar6.png" width="16" class="img-circle pull-left m-r-5" alt="" /> John Doe
</div>
</div>
</div>
<div class="widget-reminder-header">TOMORROW, NOV 5</div>
<div class="widget-reminder-container">
<div class="widget-reminder-time">All day</div>
<div class="widget-reminder-divider bg-purple"></div>
<div class="widget-reminder-content">
<h4 class="widget-title"><i class="fa fa-gift text-purple"></i> Terry Birthday</h4>
</div>
</div>
<div class="widget-reminder-container">
<div class="widget-reminder-time">
00:00<br />
00:30
</div>
<div class="widget-reminder-divider bg-danger"></div>
<div class="widget-reminder-content">
<h4 class="widget-title">Server Maintenance</h4>
<div class="widget-desc"><i class="ti-pin"></i> Data Centre</div>
</div>
</div>
</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 :
body{
background:#eee;
margin-top:20px;
}
.widget {
background: #fff;
margin-bottom: .75rem;
display: block;
position: relative;
box-shadow: 0 0.46875rem 2.1875rem rgba(90,97,105,0.1), 0 0.9375rem 1.40625rem rgba(90,97,105,0.1), 0 0.25rem 0.53125rem rgba(90,97,105,0.12), 0 0.125rem 0.1875rem rgba(90,97,105,0.1);
}
.widget .widget-header,
.widget-reminder-content,
.widget-reminder-time,
a.widget-header-title {
padding: 0.625rem;
}
.widget-chat-message:after,
.widget-chat-message:before,
.widget-reminder-container:after,
.widget-reminder-container:before {
display: table;
content: "";
clear: both;
}
.widget-footer.with-border,
.widget-reminder-container + .widget-reminder-container {
border-top: 1px solid #efeff4;
}
.widget-footer.with-bg,
.widget-header.with-bg {
background: #efeff4;
}
.widget-header.with-border {
border-bottom: 1px solid #efeff4;
}
.widget-reminder-header {
background: #efeff4;
padding: 0.625rem;
font-size: 0.625rem;
font-weight: 700;
color: #8a8a8f;
}
.widget-reminder-container {
position: relative;
}
.inverse-mode .widget-reminder-container + .widget-reminder-container {
border-color: #333;
}
.inverse-mode .widget-reminder-header {
background: #212121;
}
.widget-reminder-time {
width: 5rem;
float: left;
text-align: right;
font-size: 0.625rem;
}
.widget-reminder-divider {
position: absolute;
top: 0;
bottom: 0;
left: 5rem;
width: 0.125rem;
background: #efeff4;
}
.widget-reminder-content {
margin-left: 5.125rem;
}
.widget-header-title {
margin: 0;
font-size: 0.75rem;
font-weight: 500;
}
.widget .widget-title, .widget .widget-title a {
font-size: .75rem;
color: #000;
line-height: 1rem;
}
.widget .widget-title {
font-weight: 600;
margin: 0;
}
.widget-desc, .widget-desc a {
font-size: .6875rem;
line-height: 1rem;
color: #8A8A8F;
font-weight: 500;
}
.img-circle {
border-radius: 50%;
}
.pull-left {
float: left!important;
}
.pull-right {
float: right!important;
}
.m-t-15 {
margin-top: 15px!important;
}
.m-r-5 {
margin-right: 5px!important;
}
.widget .widget-header, .widget-reminder-content, .widget-reminder-time, a.widget-header-title {
padding: .625rem;
}