Commit 0735e4b3 authored by Shaphen's avatar Shaphen

[AFP-47 Shaphen Pangburn]: Resize modal and inherit product details to display on modal

parent 88703f7d
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>
)
}
}
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: '7px',
width: '210px',
height: '134px',
background: 'white'
top: '50%',
left: '50%',
right: '0',
bottom: '0',
marginLeft: "-465px",
marginTop: "-372px",
width: '890px',
height: '775px',
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>
)
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment