Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sample_pdp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Praveen Reghunathan Nair
sample_pdp
Commits
42ad0fd4
Commit
42ad0fd4
authored
Feb 07, 2020
by
Praveen Reghunathan Nair
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added breadcrumb
parent
c919fd9d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
45 additions
and
2 deletions
+45
-2
Breadcrumb.jsx
src/components/Breadcrumb/Breadcrumb.jsx
+21
-0
Breadcrumb.module.scss
src/components/Breadcrumb/Breadcrumb.module.scss
+11
-0
Breadcrumb.spec.js
src/components/Breadcrumb/Breadcrumb.spec.js
+0
-0
index.js
src/components/Breadcrumb/index.js
+3
-0
PDP.jsx
src/pages/PDP/PDP.jsx
+9
-2
PDP.module.scss
src/pages/PDP/PDP.module.scss
+1
-0
No files found.
src/components/Breadcrumb/Breadcrumb.jsx
0 → 100644
View file @
42ad0fd4
import
React
from
'react'
;
import
style
from
'./Breadcrumb.module.scss'
;
function
Breadcrumb
(
props
)
{
const
{
items
=
[]
}
=
props
;
return
(
<
ul
className=
{
style
.
breadcrumb
}
>
{
items
.
map
(
item
=>
{
return
(
<
li
>
<
a
href=
{
item
.
url
}
>
{
item
.
name
}
</
a
>
</
li
>
)
})
}
</
ul
>
);
}
export
default
Breadcrumb
;
\ No newline at end of file
src/components/Breadcrumb/Breadcrumb.module.scss
0 → 100644
View file @
42ad0fd4
.breadcrumb
{
display
:
flex
;
margin
:
0
;
margin-left
:
5vh
;
li
{
list-style
:
none
;
margin
:
0
10px
;
text-transform
:
capitalize
;
}
}
\ No newline at end of file
src/components/Breadcrumb/Breadcrumb.spec.js
0 → 100644
View file @
42ad0fd4
src/components/Breadcrumb/index.js
0 → 100644
View file @
42ad0fd4
import
Breadcrumb
from
'./Breadcrumb'
;
export
default
Breadcrumb
;
\ No newline at end of file
src/pages/PDP/PDP.jsx
View file @
42ad0fd4
...
...
@@ -2,12 +2,18 @@ import React, { Component } from 'react';
import
style
from
'./PDP.module.scss'
;
import
ProductDetails
from
'models/productDetail'
;
import
ImageCarousel
from
'components/ImageCarousel'
;
import
Breadcrumb
from
'components/Breadcrumb'
;
class
PDPPage
extends
Component
{
state
=
{
showImageCarousel
:
false
}
};
breadcrumb
=
[
{
name
:
'home'
,
url
:
'/'
},
{
name
:
'All New'
,
url
:
'/shop/new'
},
];
componentDidMount
()
{
const
{
match
:
{
params
:
{
productId
}
}
}
=
this
.
props
;
...
...
@@ -22,10 +28,11 @@ class PDPPage extends Component {
render
()
{
const
{
product
}
=
this
.
props
;
const
{
showImageCarousel
}
=
this
.
state
;
const
{
name
,
image
,
sellingPrice
,
images
}
=
new
ProductDetails
(
product
);
const
breadcrumbData
=
[...
this
.
breadcrumb
,
{
name
,
url
:
'#'
}];
return
(
<
section
className=
{
style
.
PDPPage
}
>
<
Breadcrumb
items=
{
breadcrumbData
}
/>
<
div
className=
{
style
.
content
}
>
<
div
className=
{
style
.
images
}
onClick=
{
this
.
toggleImageCarouselClose
}
>
<
img
...
...
src/pages/PDP/PDP.module.scss
View file @
42ad0fd4
...
...
@@ -2,6 +2,7 @@
.PDPPage
{
margin-top
:
$large-footer-height
;
padding-top
:
10px
;
h1
{
color
:
$gray2
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment