forked from kriasoft/react-starter-kit
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
var SampleData = { shopCatalogItems: ShopCatalogItemsBySku, shopCartItems: ShopCartItemsBySku };
- Loading branch information
Showing
10 changed files
with
133 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import React, { PropTypes } from 'react'; // eslint-disable-line no-unused-vars | ||
import withStyles from '../../decorators/withStyles'; // eslint-disable-line no-unused-vars | ||
import styles from './ShopCartItem.less'; // eslint-disable-line no-unused-vars | ||
|
||
@withStyles(styles) | ||
class ShopCartItem { | ||
|
||
static contextTypes = { | ||
}; | ||
|
||
static propTypes = { | ||
}; | ||
|
||
render() { | ||
return ( | ||
<div className="ShopCartItem"> | ||
<div className="ShopCartItem-container"> | ||
<div> | ||
<span>name: </span> | ||
<span>{this.props.name}</span> | ||
</div> | ||
<div> | ||
<span>quantity: </span> | ||
<span>{this.props.quantity}</span> | ||
</div> | ||
<div> | ||
<span>price: </span> | ||
<span>{this.props.unitPrice}</span> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
} | ||
|
||
export default ShopCartItem; |
3 changes: 2 additions & 1 deletion
3
src/components/ShopItem/ShopItem.less → ...components/ShopCartItem/ShopCartItem.less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
@import '../variables.less'; | ||
|
||
.ShopItem { | ||
.ShopCartItem { | ||
&-container { | ||
margin-bottom: @grid-unit; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "ShopCartItem", | ||
"version": "0.0.0", | ||
"private": true, | ||
"main": "./ShopCartItem.js" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const ShopCatalogItemsBySku = { | ||
A: { | ||
name: 'Shop Item A', | ||
unitPrice: 2, | ||
unitPricePerVolume: { | ||
4: 8 | ||
} | ||
}, | ||
B: { | ||
name: 'Shop Item B', | ||
unitPrice: 5, | ||
unitPricePerVolume: { | ||
4: 8 | ||
} | ||
} | ||
}; | ||
|
||
const ShopCartItemsBySku = { | ||
A: 1, | ||
B: 4 | ||
}; | ||
|
||
var SampleData = { | ||
shopCatalogItems: ShopCatalogItemsBySku, | ||
shopCartItems: ShopCartItemsBySku | ||
}; | ||
|
||
export default SampleData; |