Skip to content

Commit

Permalink
Add propTypes and defaultProps to ItemTableAppBar
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Campbell committed Sep 17, 2020
1 parent 585f9e7 commit b32e802
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/components/ItemTableAppBar/ItemTableAppBar.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from "react";
import PropTypes from 'prop-types'
import {makeStyles, Tooltip, Typography, AppBar, Toolbar, IconButton, Zoom} from "@material-ui/core"
import DarkModeIcon from '@material-ui/icons/Brightness4';
import LightModeIcon from '@material-ui/icons/Brightness7';
Expand Down Expand Up @@ -39,4 +40,17 @@ export default function ItemTableAppBar(props){
</AppBar>
</>
);
}
};

ItemTableAppBar.propTypes = {
/** The title of the app bar. */
"title": PropTypes.string,
/** Function to toggle darkMode. */
"setDarkMode": PropTypes.func.isRequired,
/** State variable for darkMode */
"darkMode": PropTypes.bool.isRequired
};

ItemTableAppBar.defaultProps = {
"title": ""
};

0 comments on commit b32e802

Please sign in to comment.