-
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
Justin Campbell
committed
Aug 11, 2020
1 parent
8d30372
commit 82a18f2
Showing
3 changed files
with
55 additions
and
12 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
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,39 @@ | ||
import React from "react"; | ||
import {makeStyles, Tooltip, Typography, AppBar, Toolbar, IconButton, Zoom} from "@material-ui/core" | ||
import CloseItemViewIcon from '@material-ui/icons/ChevronRight'; | ||
|
||
|
||
export default function ItemViewAppBar(props){ | ||
const useStyles = makeStyles((theme) => ({ | ||
closeButton: { | ||
marginRight: theme.spacing(2), | ||
}, | ||
title: { | ||
flexGrow: "1" | ||
}, | ||
})); | ||
|
||
const classes = useStyles(props.theme); | ||
|
||
return( | ||
<> | ||
<AppBar position="sticky" color="secondary" elevation={0}> | ||
<Toolbar> | ||
<Tooltip title={"Close Item"} | ||
arrow | ||
onClick={() => props.setActiveItem({})} | ||
TransitionComponent={Zoom} | ||
> | ||
<IconButton color="inherit" className={classes.closeButton}> | ||
<CloseItemViewIcon /> | ||
</IconButton> | ||
</Tooltip> | ||
|
||
<Typography variant="h6" className={classes.title}> | ||
{props.title} | ||
</Typography> | ||
</Toolbar> | ||
</AppBar> | ||
</> | ||
); | ||
} |