;
- { containerOneLabels.map((containerOneLabels)=> (
-
- ))}
-
-
-
-
+ { containerOneLabels.map((containerOneLabels)=>(
+ ))
+ }
-
-
-
-
Buttons go here and will be Dynamically Loaded by react
diff --git a/src/components/YearGraph/YearGraphStyled.tsx b/src/components/YearGraph/YearGraphStyled.tsx
index f25ed18..a6cc39a 100644
--- a/src/components/YearGraph/YearGraphStyled.tsx
+++ b/src/components/YearGraph/YearGraphStyled.tsx
@@ -12,20 +12,40 @@ background-color:#eceff1;
-export const Label = styled.label<{ myLabel: string }>`
+export const Label = styled.label <{ labelName: string }>`
color: green;
-${props => props.myLabel == "test" && css `background: palevioletred;
- color: red;`
+${props => props.labelName == "currentPriceLabel" && css`
+ color: #fbb800;
+
+ `
}
-${props => props.myLabel == "test2" && css `background: palevioletred;
- color: blue;`
+${props => props.labelName == "faIconLabel" && css`
+ color: #2121a4;
+
+ `
}
+${props => props.labelName == "priceDiffernceLabel" && css`
+ color: red;
+
+ `
+}
+
+
+${props => props.labelName == "priceDifferncePercentLabel" && css`
+ color: aquamarine;
+
+ `
+}
+
+
+
+
font-size: 40px;
`
\ No newline at end of file
From 7a00c515ee803ec43a67589b8951b53606e0ebda Mon Sep 17 00:00:00 2001
From: Joey <35553162+javascriptjoey@users.noreply.github.com>
Date: Sat, 17 Jul 2021 16:56:01 -0700
Subject: [PATCH 15/15] Added container three buttons
---
src/components/YearGraph/YearGraph.styles.css | 17 +++-
src/components/YearGraph/YearGraph.tsx | 29 +++++--
src/components/YearGraph/YearGraphStyled.tsx | 79 ++++++++++---------
3 files changed, 79 insertions(+), 46 deletions(-)
diff --git a/src/components/YearGraph/YearGraph.styles.css b/src/components/YearGraph/YearGraph.styles.css
index 1dcfaa2..92c6a7f 100644
--- a/src/components/YearGraph/YearGraph.styles.css
+++ b/src/components/YearGraph/YearGraph.styles.css
@@ -1,18 +1,31 @@
.wrapper {
+ margin-top: 25px;
+ margin-left: 15px;
+ margin-right: 15px;
+ margin-bottom: 25px;
display: flex;
- min-height: 100vh;
flex-direction: column;
background-color:white;
+ border-style: solid;
+ border-radius: 20px;
+ border-color: #009688;
+ border-width: 10px;
}
.container-1 {
- background-color: #e0f2f1;
+ border-top-left-radius: 20px;
+ border-top-right-radius: 20px;
+ background-color: white;
display: flex;
flex-direction: row;
+ align-items: flex-end;
}
.container-2 {
background-color: #b2dfdb;
+ display: flex-box;
+ flex-direction: row;
+ align-items: center;
}
.container-3 {
diff --git a/src/components/YearGraph/YearGraph.tsx b/src/components/YearGraph/YearGraph.tsx
index 75fb6db..a5b706c 100644
--- a/src/components/YearGraph/YearGraph.tsx
+++ b/src/components/YearGraph/YearGraph.tsx
@@ -6,31 +6,48 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faCaretUp } from '@fortawesome/free-solid-svg-icons'
import { faStar } from '@fortawesome/free-regular-svg-icons'
import { Label } from "./YearGraphStyled";
+import { Button } from "./YearGraphStyled";
// Creating a YearGraph JSX Element
const YearGraph = ( ): JSX.Element => {
-
+// Container 1
const containerOneLabels = [
- {id:1, value: " 19.00", labelName:"currentPriceLabel"},
+ {id:1, value: "19.00", labelName:"currentPriceLabel"},
{id:2, value:
, labelName:"faIconLabel"},
{id:3, value: " 0.10", labelName:"priceDiffernceLabel" },
{id:4, value: " (00.53%)", labelName:"priceDifferncePercentLabel"},
];
-
+
+// Container 2
+
+
+// Container 3
+const containerThreeButtons = [
+ {id:5, title: "Day"},
+ {id:6, title: "Week"},
+ {id:7, title: "Month"},
+ {id:8, title: "Year"},
+ {id:9, title: "5 Year"},
+ {id:10,title: "Max"},
+];
return (
-
;
+
{ containerOneLabels.map((containerOneLabels)=>(
))
}
+
- Buttons go here and will be Dynamically Loaded by react
+ Some more Labels go here
+
- Labels go here
+ { containerThreeButtons.map((containerThreeButtons)=>(
+ ))
+ }
3D Chart goes here
diff --git a/src/components/YearGraph/YearGraphStyled.tsx b/src/components/YearGraph/YearGraphStyled.tsx
index a6cc39a..7184d36 100644
--- a/src/components/YearGraph/YearGraphStyled.tsx
+++ b/src/components/YearGraph/YearGraphStyled.tsx
@@ -8,44 +8,47 @@ min-height: 100vh;
flex-direction: column;
background-color:#eceff1;
`
-
-
-
-
-export const Label = styled.label <{ labelName: string }>`
-
-color: green;
-
-
-${props => props.labelName == "currentPriceLabel" && css`
- color: #fbb800;
-
- `
- }
-
-
-${props => props.labelName == "faIconLabel" && css`
- color: #2121a4;
-
- `
- }
-
-
-${props => props.labelName == "priceDiffernceLabel" && css`
- color: red;
-
- `
-}
-
-
-${props => props.labelName == "priceDifferncePercentLabel" && css`
- color: aquamarine;
-
- `
+export const Button = styled.button`
+width: 90px;
+height: 30px;
+border-radius: 25px;
+margin-right: 20px;
+color: #636363;
+&:hover {
+ background: #009688;
+ color: white;
+ cursor: pointer;
}
+`
-
-
-
-font-size: 40px;
+export const Label = styled.label <{ labelName: string }>`
+ display: flex;
+ font-size: 20px;
+ color: grey;
+ padding-right:4px;
+ ${props => props.labelName == "currentPriceLabel" && css`
+ color: black;
+ font-size: 2em;
+ padding-left:10px;
+ `
+ }
+
+ ${props => props.labelName == "faIconLabel" && css`
+ align-items: flex-end;
+ color: green;
+ font-size: 20px;
+ `
+ }
+
+ ${props => props.labelName == "priceDiffernceLabel" && css`
+ color: green;
+ font-size: 15px;
+ `
+ }
+
+ ${props => props.labelName == "priceDifferncePercentLabel" && css`
+ color: green;
+ font-size: 15px;
+ `
+ }
`
\ No newline at end of file