Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ecommerce-maven
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
Ascend
ecommerce-maven
Commits
0735e4b3
Commit
0735e4b3
authored
May 10, 2021
by
Shaphen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AFP-47 Shaphen Pangburn]: Resize modal and inherit product details to display on modal
parent
88703f7d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
15 deletions
+36
-15
product-details.jsx
ecom-web/src/components/product-market/product-details.jsx
+16
-0
product-item.jsx
ecom-web/src/components/product-market/product-item.jsx
+16
-15
product-market.css
ecom-web/src/resources/stylesheets/product-market.css
+4
-0
No files found.
ecom-web/src/components/product-market/product-details.jsx
0 → 100644
View file @
0735e4b3
import
React
,
{
Component
}
from
'react'
export
default
class
ProductDetails
extends
Component
{
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{}
}
render
()
{
return
(
<
div
className=
"product-details-container"
>
Whoa its a modal!
</
div
>
)
}
}
ecom-web/src/components/product-market/product-item.jsx
View file @
0735e4b3
import
React
,
{
Component
}
from
'react'
import
Modal
from
'react-modal'
;
import
ProductDetails
from
'./product-details'
;
import
'../../resources/stylesheets/product-market.css'
;
export
default
class
ProductItem
extends
Component
{
...
...
@@ -30,7 +31,7 @@ export default class ProductItem extends Component {
src=
{
this
.
props
.
item
.
productImageUrl
?
this
.
props
.
item
.
productImageUrl
:
"-no photo-"
}
onClick=
{
this
.
toggleDetailsModal
}
/>
<
p
id=
"more-details-text"
>
More Details
</
p
>
<
p
onClick=
{
this
.
toggleDetailsModal
}
id=
"more-details-text"
>
More Details
</
p
>
</
div
>
<
p
id=
"prod-name"
>
{
this
.
props
.
item
.
productName
}
</
p
>
<
div
id=
"prod-price"
>
...
...
@@ -60,25 +61,25 @@ export default class ProductItem extends Component {
onRequestClose=
{
this
.
toggleDetailsModal
}
style=
{
{
content
:
{
position
:
"absolute"
,
top
:
'55px
'
,
left
:
'85px
'
,
right
:
'0'
,
bottom
:
'0'
,
border
:
'1px solid black'
,
padding
:
'7
px'
,
width
:
'210
px'
,
height
:
'134px
'
,
background
:
'white'
top
:
'50%'
,
left
:
'50%
'
,
right
:
'0
'
,
bottom
:
'0'
,
marginLeft
:
"-465px"
,
marginTop
:
"-372px"
,
width
:
'890
px'
,
height
:
'775
px'
,
background
:
'white
'
,
borderRadius
:
"10px"
},
overlay
:
{
position
:
'fixed'
,
backgroundColor
:
'rgba(0,0,0,0.0)'
,
zIndex
:
'50'
position
:
'fixed'
,
backgroundColor
:
'rgba(0,0,0,0.0)'
,
zIndex
:
'50'
}
}
}
>
Whoa its a modal!
<
ProductDetails
product=
{
this
.
props
.
item
}
/>
</
Modal
>
</
div
>
)
...
...
ecom-web/src/resources/stylesheets/product-market.css
View file @
0735e4b3
...
...
@@ -159,6 +159,10 @@
display
:
flex
;
}
#product-details-modal
{
box-shadow
:
10px
10px
20px
;
}
input
::-webkit-outer-spin-button
,
input
::-webkit-inner-spin-button
{
-webkit-appearance
:
none
;
...
...
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