File tree Expand file tree Collapse file tree 15 files changed +62
-55
lines changed Expand file tree Collapse file tree 15 files changed +62
-55
lines changed File renamed without changes.
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ const Dashboard = () => {
1616 < BasePageContainer >
1717 < BasePageToolbar
1818 title = { 'Dashboard' }
19- actionsComponent = { DashboardActions }
19+ actions = { < DashboardActions /> }
2020 > </ BasePageToolbar >
2121 < Grid container spacing = { 3 } >
2222 < KeyMetrics />
Original file line number Diff line number Diff line change @@ -2,9 +2,9 @@ import React from 'react'
22import Typography from '@material-ui/core/Typography'
33import Link from '@material-ui/core/Link'
44import { makeStyles } from '@material-ui/core/styles'
5- // import pkg from '../../../package.json'
5+ import pkg from '../../../package.json'
66
7- const Footer = ( ) => {
7+ const Footer : React . FC = ( ) => {
88 const classes = useStyles ( )
99
1010 return (
@@ -15,7 +15,7 @@ const Footer = () => {
1515 color = "secondary"
1616 href = "https://github.com/modularcode/modular-admin-react/releases"
1717 >
18- { /* v{pkg.version} */ }
18+ v{ pkg . version }
1919 </ Link >
2020 { ' | ' }
2121 < Link
File renamed without changes.
Original file line number Diff line number Diff line change 11import React from 'react'
2- import PropTypes from 'prop-types'
32import clsx from 'clsx'
43
54import { makeStyles } from '@material-ui/core/styles'
65import AppBar from '@material-ui/core/AppBar'
76import Toolbar from '@material-ui/core/Toolbar'
87import IconButton from '@material-ui/core/IconButton'
9-
108import IconMenu from '@material-ui/icons/Menu'
119
12- import HeaderDemo from './AppHeaderDemoButtons '
10+ import { ITheme } from '_theme/ '
1311
12+ import HeaderDemo from './AppHeaderDemoButtons'
13+ import HeaderProfile from './AppHeaderProfile'
1414// import HeaderSearch from './AppHeaderSearch'
1515// import HeaderNotifications from './AppHeaderNotifications'
16- import HeaderProfile from './AppHeaderProfile'
1716
18- const AppHeader = ( { onToggleClick } ) => {
17+ export interface IAppHeader {
18+ onToggleClick ( ) : void
19+ }
20+
21+ const AppHeader : React . FC < IAppHeader > = ( { onToggleClick } ) => {
1922 const classes = useStyles ( )
2023
2124 return (
@@ -39,11 +42,7 @@ const AppHeader = ({ onToggleClick }) => {
3942 )
4043}
4144
42- AppHeader . propTypes = {
43- onToggleClick : PropTypes . func ,
44- }
45-
46- const useStyles = makeStyles ( ( theme ) => ( {
45+ const useStyles = makeStyles < ITheme > ( ( theme ) => ( {
4746 header : {
4847 background : '#fff' ,
4948 color : '#7b7b7b' ,
Original file line number Diff line number Diff line change @@ -7,7 +7,9 @@ import IconCode from '@material-ui/icons/Code'
77import IconStar from '@material-ui/icons/Star'
88import IconDownload from '@material-ui/icons/GetApp'
99
10- const AppHeaderDemoButtons = ( props ) => {
10+ export interface IAppHeaderDemoButtonsProps { }
11+
12+ const AppHeaderDemoButtons : React . FC < IAppHeaderDemoButtonsProps > = ( props ) => {
1113 const classes = useStyles ( props )
1214
1315 return (
Original file line number Diff line number Diff line change 1- import React from 'react'
1+ import React , { MouseEvent } from 'react'
22
33import { makeStyles } from '@material-ui/core/styles'
44import IconButton from '@material-ui/core/IconButton'
@@ -12,6 +12,8 @@ import ListItemAvatar from '@material-ui/core/ListItemAvatar'
1212import Avatar from '@material-ui/core/Avatar'
1313import Typography from '@material-ui/core/Typography'
1414
15+ import { ITheme } from '_theme/'
16+
1517const notifications = [
1618 {
1719 user : {
@@ -39,16 +41,16 @@ const notifications = [
3941 } ,
4042]
4143
42- const AppHeaderNotifications = ( ) => {
44+ const AppHeaderNotifications : React . FC = ( ) => {
4345 const classes = useStyles ( )
44- const [ anchorEl , setAnchorEl ] = React . useState ( null )
46+ const [ anchorEl , setAnchorEl ] = React . useState < HTMLButtonElement > ( )
4547
46- function handleClick ( event ) {
48+ function handleClick ( event : MouseEvent < HTMLButtonElement > ) {
4749 setAnchorEl ( event . currentTarget )
4850 }
4951
5052 function handleClose ( ) {
51- setAnchorEl ( null )
53+ setAnchorEl ( undefined )
5254 }
5355
5456 return (
@@ -120,7 +122,7 @@ const AppHeaderNotifications = () => {
120122// return <List className={classes.notifications}></List>
121123// }
122124
123- const useStyles = makeStyles ( ( theme ) => ( {
125+ const useStyles = makeStyles < ITheme > ( ( theme ) => ( {
124126 headerNotifications : {
125127 marginRight : 23 ,
126128 // position: 'relative',
Original file line number Diff line number Diff line change 1- import React from 'react'
1+ import React , { MouseEvent } from 'react'
22import clsx from 'clsx'
33
44import { Link } from 'react-router-dom'
@@ -18,9 +18,9 @@ import IconAccount from '@material-ui/icons/AccountBalance'
1818import IconSettings from '@material-ui/icons/Settings'
1919import IconLogout from '@material-ui/icons/ExitToApp'
2020
21- const AppHeaderProfile = ( ) => {
21+ const AppHeaderProfile : React . FC = ( ) => {
2222 const classes = useStyles ( )
23- const [ anchorEl , setAnchorEl ] = React . useState ( null )
23+ const [ anchorEl , setAnchorEl ] = React . useState < HTMLButtonElement > ( )
2424 const user = {
2525 firstName : 'Gevorg' ,
2626 }
@@ -29,12 +29,12 @@ const AppHeaderProfile = () => {
2929 return < div className = { clsx ( 'headerProfile' , classes . headerProfile ) } />
3030 }
3131
32- function handleClick ( event ) {
32+ function handleClick ( event : MouseEvent < HTMLButtonElement > ) {
3333 setAnchorEl ( event . currentTarget )
3434 }
3535
3636 function handleClose ( ) {
37- setAnchorEl ( null )
37+ setAnchorEl ( undefined )
3838 }
3939
4040 return (
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import DialogTitle from '@material-ui/core/DialogTitle'
1111import IconSearch from '@material-ui/icons/Search'
1212import IconButton from '@material-ui/core/IconButton'
1313
14- const AppHeaderSearch = ( ) => {
14+ const AppHeaderSearch : React . FC = ( ) => {
1515 const classes = useStyles ( )
1616 const [ open , setOpen ] = React . useState ( false )
1717
File renamed without changes.
You can’t perform that action at this time.
0 commit comments