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>
<div class="container">
<div class="row bootstrap snippets bootdeys" id="store-list">
<div class="col-md-6 col-xs-12">
<div class="panel">
<div class="panel-body">
<div class="row">
<div class="col-sm-5">
<a href="#/"><img src="https://www.bootdey.com/image/300x300/FF4500/000000" class="img-responsive"/></a>
</div>
<div class="col-sm-7">
<h4 class="title-store">
<strong><a href="#/">Product name</a></strong>
</h4>
<hr/>
<p>Iki kie mung omah lodong dadiine rodo murah tur yo ra awet wong karang mung murah, nek pingin awet yo tuku omah-omahan wae sing ra iso rusak.</p>
<p>
<a href="#/" class="btn btn-default" disabled="" data-original-title="" title="">$12,990</a>
<a href="#/" class="btn btn-warning pull-right" data-original-title="" title="">Buy Now</a>
</p>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6 col-xs-12">
<div class="panel">
<div class="panel-body">
<div class="row">
<div class="col-sm-5">
<a href="#/"><img src="https://www.bootdey.com/image/300x300/DA70D6/000000" class="img-responsive"/></a>
</div>
<div class="col-sm-7">
<h4 class="title-store">
<strong><a href="#/">Product name</a></strong>
</h4>
<hr/>
<p>Iki kie mung omah lodong dadiine rodo murah tur yo ra awet wong karang mung murah, nek pingin awet yo tuku omah-omahan wae sing ra iso rusak.</p>
<p>
<a href="#/" class="btn btn-default" disabled="" data-original-title="" title="">$12,990</a>
<a href="#/" class="btn btn-warning pull-right" data-original-title="" title="">Buy Now</a>
</p>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6 col-xs-12">
<div class="panel">
<div class="panel-body">
<div class="row">
<div class="col-sm-5">
<a href="#/"><img src="https://www.bootdey.com/image/300x300/4169E1/000000" class="img-responsive"/></a>
</div>
<div class="col-sm-7">
<h4 class="title-store">
<strong><a href="#/">Product name</a></strong>
</h4>
<hr/>
<p>Iki kie mung omah lodong dadiine rodo murah tur yo ra awet wong karang mung murah, nek pingin awet yo tuku omah-omahan wae sing ra iso rusak.</p>
<p>
<a href="#/" class="btn btn-default" disabled="" data-original-title="" title="">$12,990</a>
<a href="#/" class="btn btn-warning pull-right" data-original-title="" title="">Buy Now</a>
</p>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6 col-xs-12">
<div class="panel">
<div class="panel-body">
<div class="row">
<div class="col-sm-5">
<a href="#/"><img src="https://www.bootdey.com/image/300x300/40E0D0/000000" class="img-responsive"/></a>
</div>
<div class="col-sm-7">
<h4 class="title-store">
<strong><a href="#/">Product name</a></strong>
</h4>
<hr/>
<p>Iki kie mung omah lodong dadiine rodo murah tur yo ra awet wong karang mung murah, nek pingin awet yo tuku omah-omahan wae sing ra iso rusak.</p>
<p>
<a href="#/" class="btn btn-default" disabled="" data-original-title="" title="">$12,990</a>
<a href="#/" class="btn btn-warning pull-right" data-original-title="" title="">Buy Now</a>
</p>
</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-color: #f2f2f2;
margin-top:20px;
}
#store-list img {
width: 100%;
height: 170px;
border: 5px solid #ecf0f1;
margin-bottom: 7px;
}
#store-list h4.title-store a:hover {
-webkit-transition: all 1s ease;
-moz-transition: all 1s ease;
-ms-transition: all 1s ease;
-o-transition: all 1s ease;
transition: all 1s ease;
color: #f1c40f;
}
#store-list h4.title-store a {
color: #f39c12;
}
.btn.btn-default {
border-color: #bdc3c7;
background-color: #bdc3c7;
border: 1px solid #bdc3c7;
}
.btn.btn-warning {
border-color: #f1c40f;
background-color: #f1c40f;
border: 1px solid #f1c40f;
}