|
1 | 1 | import React from 'react' |
| 2 | + |
| 3 | +// import styled components for css styling... |
2 | 4 | import styled from 'styled-components' |
3 | 5 |
|
| 6 | +// import React Router Dom Library for Routing.. |
| 7 | +import { Link } from 'react-router-dom' |
| 8 | + |
| 9 | +// import required components... |
| 10 | +import Charts from '../components/Charts' |
| 11 | + |
| 12 | +// import produts data from dummyData.js file... |
| 13 | +import { productsData } from '../Data/dummyData' |
| 14 | + |
4 | 15 | // Styling... |
5 | 16 | const Container = styled.div` |
6 | 17 | flex: 4; |
7 | 18 | ` |
| 19 | +const ProductTitleContainer = styled.div` |
| 20 | + |
| 21 | +` |
| 22 | +const ProductTitle = styled.h1` |
| 23 | +
|
| 24 | +` |
| 25 | +const ProductAddNew = styled.button` |
| 26 | +
|
| 27 | +` |
| 28 | +const ProductTop = styled.div` |
8 | 29 |
|
| 30 | +` |
| 31 | +const ProductBottom = styled.div` |
| 32 | + |
| 33 | +` |
| 34 | +const ProductTopLeft = styled.div` |
| 35 | + |
| 36 | +` |
| 37 | +const ProductTopRight = styled.div` |
| 38 | + |
| 39 | +` |
| 40 | +const ProductInfoTop = styled.div` |
| 41 | +
|
| 42 | +` |
| 43 | +const ProductInfoBottom = styled.div` |
| 44 | +
|
| 45 | +` |
| 46 | +const ProductInfoImage = styled.img` |
| 47 | + |
| 48 | +` |
| 49 | +const ProductInfoName = styled.h1` |
| 50 | + |
| 51 | +` |
| 52 | +const ProductInfoBottomItem = styled.div` |
| 53 | + |
| 54 | +` |
| 55 | +const ProductInfoBottomKey = styled.span` |
| 56 | +
|
| 57 | +` |
| 58 | +const ProductInfoBottomValue = styled.span` |
| 59 | + |
| 60 | +` |
| 61 | +// Product Single Page React Functional Component... |
9 | 62 | export default function ProductSinglePage() { |
10 | | - return ( |
11 | | - <Container> |
12 | | - Product Single Page... |
13 | | - </Container> |
14 | | - ) |
| 63 | + return ( |
| 64 | + <Container> |
| 65 | + <ProductTitleContainer> |
| 66 | + <ProductTitle>Item Page</ProductTitle> |
| 67 | + <Link to="/newproduct" style={{ color: 'inherit', backgroundColor: 'inherit', textDecoration: 'none' }}> |
| 68 | + <ProductAddNew>New</ProductAddNew> |
| 69 | + </Link> |
| 70 | + </ProductTitleContainer> |
| 71 | + <ProductTop> |
| 72 | + <ProductTopLeft> |
| 73 | + <Charts data={productsData} title="Product Movements" secondLine="Sales" firstLine="Returns" /> |
| 74 | + </ProductTopLeft> |
| 75 | + <ProductTopRight> |
| 76 | + <ProductInfoTop> |
| 77 | + <ProductInfoImage src="https://i.ibb.co/GsH4D2J/2.png" alt="" /> |
| 78 | + <ProductInfoName>Iphone 12mini</ProductInfoName> |
| 79 | + </ProductInfoTop> |
| 80 | + <ProductInfoBottom> |
| 81 | + <ProductInfoBottomItem> |
| 82 | + <ProductInfoBottomKey>Serial Number</ProductInfoBottomKey> |
| 83 | + <ProductInfoBottomValue>09562257110</ProductInfoBottomValue> |
| 84 | + </ProductInfoBottomItem> |
| 85 | + <ProductInfoBottomItem> |
| 86 | + <ProductInfoBottomKey>Sales</ProductInfoBottomKey> |
| 87 | + <ProductInfoBottomValue>12500</ProductInfoBottomValue> |
| 88 | + </ProductInfoBottomItem> |
| 89 | + <ProductInfoBottomItem> |
| 90 | + <ProductInfoBottomKey>Active</ProductInfoBottomKey> |
| 91 | + <ProductInfoBottomValue>Yes</ProductInfoBottomValue> |
| 92 | + </ProductInfoBottomItem> |
| 93 | + <ProductInfoBottomItem> |
| 94 | + <ProductInfoBottomKey>In Stock</ProductInfoBottomKey> |
| 95 | + <ProductInfoBottomValue>Yes</ProductInfoBottomValue> |
| 96 | + </ProductInfoBottomItem> |
| 97 | + </ProductInfoBottom> |
| 98 | + </ProductTopRight> |
| 99 | + </ProductTop> |
| 100 | + <ProductBottom></ProductBottom> |
| 101 | + </Container> |
| 102 | + ) |
15 | 103 | } |
0 commit comments