-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
209 additions
and
70 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
.side-navbar { | ||
display: flex; | ||
flex-direction: column; | ||
min-width: 180px; | ||
width: 180px; | ||
background: linear-gradient(to right, #152440, #152842); | ||
border-right: 1px solid #a8d4e4; | ||
} |
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,73 @@ | ||
import React, { Component } from "react"; | ||
import * as am4core from "@amcharts/amcharts4/core"; | ||
import am4themes_animated from "@amcharts/amcharts4/themes/animated"; | ||
import am4themes_dark from "@amcharts/amcharts4/themes/dark"; | ||
import * as am4charts from "@amcharts/amcharts4/charts"; | ||
|
||
interface ProxyManagerPieChartProps {} | ||
|
||
class ProxyManagerPieChart extends Component<ProxyManagerPieChartProps, {}> { | ||
async componentDidMount() { | ||
// Themes begin | ||
am4core.useTheme(am4themes_animated); | ||
am4core.useTheme(am4themes_dark); | ||
// Themes end | ||
// Create chart instance | ||
let chart = am4core.create("pm-pie-chart-div", am4charts.PieChart); | ||
|
||
// Add data | ||
chart.data = [ | ||
{ | ||
country: "Lithuania", | ||
litres: 501.9 | ||
}, | ||
{ | ||
country: "Czech Republic", | ||
litres: 301.9 | ||
}, | ||
{ | ||
country: "Ireland", | ||
litres: 201.1 | ||
}, | ||
{ | ||
country: "Germany", | ||
litres: 165.8 | ||
}, | ||
{ | ||
country: "Australia", | ||
litres: 139.9 | ||
}, | ||
{ | ||
country: "Austria", | ||
litres: 128.3 | ||
}, | ||
{ | ||
country: "UK", | ||
litres: 99 | ||
}, | ||
{ | ||
country: "Belgium", | ||
litres: 60 | ||
}, | ||
{ | ||
country: "The Netherlands", | ||
litres: 50 | ||
} | ||
]; | ||
|
||
// Add and configure Series | ||
let pieSeries = chart.series.push(new am4charts.PieSeries()); | ||
pieSeries.dataFields.value = "litres"; | ||
pieSeries.dataFields.category = "country"; | ||
} | ||
|
||
render() { | ||
return ( | ||
<div className="proxy-manager-pie-chart-container"> | ||
<div id="pm-pie-chart-div" style={{ backgroundColor: "grey" }}></div> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default ProxyManagerPieChart; |
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,71 @@ | ||
import styled from "styled-components"; | ||
import { NavLink } from "react-router-dom"; | ||
import { DataHoundRouteEnum } from "../../common/enums"; | ||
import { Icon } from "@material-ui/core"; | ||
import React from "react"; | ||
|
||
const styledSubModuleClassName = "styled-sub-module-link"; | ||
const subModuleTextClassName = "sub-module-name"; | ||
const activeSubModuleClassName = "active-sub-module"; | ||
const subModuleIconClassName = "sub-module-icon"; | ||
|
||
export const StyledSideLink = styled(NavLink)` | ||
text-decoration: none; | ||
&:focus, | ||
&:hover, | ||
&:visited, | ||
&:link, | ||
&:active { | ||
text-decoration: none; | ||
color: white; | ||
} | ||
&.${styledSubModuleClassName} { | ||
display: flex; | ||
flex-direction: column; | ||
min-width: 174px; | ||
width: 174px; | ||
min-height: 60px; | ||
padding: 18px 0; | ||
border-left: 6px solid transparent; | ||
border-bottom: 1px solid #a8d4e4; | ||
.${subModuleTextClassName} { | ||
margin: auto; | ||
padding: 0 12px; | ||
color: #7f695e; | ||
} | ||
.${subModuleIconClassName} { | ||
margin: auto; | ||
color: #7f695e; | ||
} | ||
} | ||
&.${activeSubModuleClassName} { | ||
border-left: 6px solid #ff7831; | ||
.${subModuleTextClassName} { | ||
color: white; | ||
} | ||
.${subModuleIconClassName} { | ||
color: white; | ||
} | ||
} | ||
`; | ||
|
||
interface ISideLink { | ||
children: string; | ||
to: DataHoundRouteEnum; | ||
icon: string; | ||
} | ||
|
||
function SideLink({ children, to, icon }: ISideLink) { | ||
return ( | ||
<StyledSideLink className={styledSubModuleClassName} to={to} activeClassName={activeSubModuleClassName}> | ||
<Icon className={subModuleIconClassName}>{icon}</Icon> | ||
<div className={subModuleTextClassName}>{children}</div> | ||
</StyledSideLink> | ||
); | ||
} | ||
|
||
export default SideLink; |
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 |
---|---|---|
@@ -1,8 +1,10 @@ | ||
import React from "react"; | ||
import React, { FunctionComponent } from "react"; | ||
import "../../assets/styles/componentstyles/SideNavBar.scss"; | ||
|
||
function SideNavBar() { | ||
return <div className="side-navbar"></div>; | ||
} | ||
interface ISideNavBarProps {} | ||
|
||
const SideNavBar: FunctionComponent<ISideNavBarProps> = (props) => { | ||
return <div className="side-navbar">{props.children}</div>; | ||
}; | ||
|
||
export default SideNavBar; |
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