File tree Expand file tree Collapse file tree 8 files changed +127
-6
lines changed
Expand file tree Collapse file tree 8 files changed +127
-6
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ apiVersion: v1
22description : A Helm chart for kube-ts-react-client
33name : kube-ts-react-client
44version : 1.0.0
5- appVersion : 1.6.1
5+ appVersion : 1.6.2
66home : https://cloud.docker.com/u/kubejs/repository/docker/kubejs/kube-ts-react-client
77icon : https://avatars2.githubusercontent.com/u/47761918?s=200&v=4
88sources :
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ replicaCount: 2
66
77image :
88 repository : kubejs/kube-ts-react-client
9- tag : 1.6.1
9+ tag : 1.6.2
1010 pullPolicy : Always
1111 containerPort : 80
1212
Original file line number Diff line number Diff line change 1+ // tslint:disable:no-magic-numbers
2+ import { Badge , Typography } from '@material-ui/core' ;
3+ import Button from '@material-ui/core/Button' ;
4+ import Menu from '@material-ui/core/Menu' ;
5+ import { withStyles } from '@material-ui/core/styles' ;
6+ import ShoppingCartIcon from '@material-ui/icons/ShoppingCart' ;
7+ import React from 'react' ;
8+
9+ const StyledMenu = withStyles ( {
10+ paper : {
11+ border : '1px solid #d3d4d5' ,
12+ } ,
13+ } ) ( ( props : any ) => (
14+ < Menu
15+ elevation = { 0 }
16+ getContentAnchorEl = { null }
17+ anchorOrigin = { {
18+ horizontal : 'center' ,
19+ vertical : 'bottom' ,
20+ } }
21+ transformOrigin = { {
22+ horizontal : 'center' ,
23+ vertical : 'top' ,
24+ } }
25+ { ...props }
26+ />
27+ ) ) ;
28+
29+ const CartDropdown = ( ) => {
30+ // TODO: refactor component
31+ const [ anchorEl , setAnchorEl ] = React . useState ( null ) ;
32+
33+ const handleClick = ( event : any ) => {
34+ setAnchorEl ( event . currentTarget ) ;
35+ } ;
36+
37+ const handleClose = ( ) => {
38+ setAnchorEl ( null ) ;
39+ } ;
40+
41+ return (
42+ < div style = { { display : 'flex' , alignItems : 'center' } } >
43+ < Button
44+ aria-controls = "customized-menu"
45+ aria-haspopup = "true"
46+ variant = "text"
47+ color = "inherit"
48+ onClick = { handleClick }
49+ >
50+ < Badge
51+ badgeContent = { 2 }
52+ color = "secondary"
53+ >
54+ < ShoppingCartIcon />
55+ </ Badge >
56+ </ Button >
57+ < StyledMenu
58+ id = "customized-menu"
59+ anchorEl = { anchorEl }
60+ keepMounted
61+ open = { Boolean ( anchorEl ) }
62+ onClose = { handleClose }
63+ >
64+ < Typography style = { { padding : 10 } } > Learn React from scratch - £17.99</ Typography >
65+ </ StyledMenu >
66+ </ div >
67+ ) ;
68+ } ;
69+
70+ // tslint:disable-next-line:max-file-line-count
71+ export default CartDropdown ;
Original file line number Diff line number Diff line change @@ -68,7 +68,6 @@ const CoursesTabs = ({ categories, courses }: Options) => {
6868 < div className = { classes . root } >
6969 < Tabs
7070 centered = { false }
71- disableRipple
7271 orientation = "vertical"
7372 value = { value }
7473 onChange = { handleChange }
Original file line number Diff line number Diff line change 1+ import { Container , Link , Typography } from '@material-ui/core' ;
2+ import React from 'react' ;
3+ import LanguageDropdown from '../../atoms/LanguageDropdown' ;
4+ import useStyles from './styles' ;
5+
6+ const Copyright = ( ) => (
7+ < Typography variant = "body2" color = "inherit" align = "center" >
8+ { 'Copyright © ' }
9+ < Link color = "inherit" href = "https://material-ui.com/" >
10+ Kudemy
11+ </ Link > { ' ' }
12+ { new Date ( ) . getFullYear ( ) }
13+ { '.' }
14+ </ Typography >
15+ ) ;
16+
17+ const Footer = ( ) => {
18+ const classes = useStyles ( ) ;
19+
20+ return (
21+ < footer className = { classes . footer } >
22+ < Container maxWidth = "lg" >
23+ < LanguageDropdown />
24+ < Copyright />
25+ </ Container >
26+ </ footer >
27+ ) ;
28+ } ;
29+
30+ export default Footer ;
Original file line number Diff line number Diff line change 1+ // tslint:disable:no-magic-numbers
2+ import {
3+ createStyles ,
4+ makeStyles ,
5+ Theme ,
6+ } from '@material-ui/core/styles' ;
7+ const useStyles = makeStyles ( ( theme : Theme ) =>
8+ createStyles ( {
9+ footer : {
10+ backgroundColor : theme . palette . primary . main ,
11+ color : '#fff' ,
12+ marginTop : theme . spacing ( 2 ) ,
13+ minHeight : '150px' ,
14+ padding : theme . spacing ( 2 ) ,
15+ } ,
16+ } )
17+ ) ;
18+
19+ export default useStyles ;
Original file line number Diff line number Diff line change 11import CssBaseline from '@material-ui/core/CssBaseline' ;
22import clsx from 'clsx' ;
33import React , { useState } from 'react' ;
4+ import Footer from '../Footer' ;
45import NavBar from '../NavBar' ;
56import Sidebar from '../Sidebar' ;
67import useStyles from './styles' ;
@@ -11,7 +12,7 @@ export interface Options {
1112
1213const Layout = ( { children } : Options ) => {
1314 const classes = useStyles ( ) ;
14-
15+
1516 const [ open , setOpen ] = useState ( false ) ;
1617
1718 function handleSidebarOpen ( ) {
@@ -37,6 +38,7 @@ const Layout = ({ children }: Options) => {
3738 >
3839 < div className = { classes . drawerHeader } />
3940 { children }
41+ < Footer />
4042 </ main >
4143 </ div >
4244 ) ;
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import React from 'react';
99import { useTranslation } from 'react-i18next' ;
1010import { Link } from 'react-router-dom' ;
1111import Autocomplete from '../../atoms/Autocomplete' ;
12- import LanguageDropdown from '../../atoms/LanguageDropdown ' ;
12+ import CartDropdown from '../../atoms/CartDropdown ' ;
1313import LogoutButton from '../../atoms/LogoutButton' ;
1414import { LOGIN , REGISTER } from '../../constants/routes' ;
1515// source: https://www.freepik.com
@@ -93,7 +93,7 @@ const NavBar = ({ handleSidebarOpen, open }: any) => {
9393 < div className = { classes . grow } />
9494
9595 < div className = { classes . sectionDesktop } >
96- < LanguageDropdown />
96+ < CartDropdown />
9797
9898 < OnlyUnauthenticated >
9999 < Button
You can’t perform that action at this time.
0 commit comments