Skip to content

Commit

Permalink
Changed position to fixed and appbar width set to inherit its parent
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Thomas Elfreich committed Sep 24, 2020
1 parent 4222c64 commit 99d94c3
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
25 changes: 25 additions & 0 deletions src/ItemViewAppBar.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import React from "react";
import { render, unmountComponentAtNode} from "react-dom";
import { act } from "react-dom/test-utils";

import ItemViewAppBar from "./ItemViewAppBar";

let container = null;
beforeEach(() => {
//Setup a DOM element as a render target
container = document.createElement("div");
document.body.appendChild(container);
});

afterEach(() => {
unmountComponentAtNode(container);
container.remove();
container = null;
});

it("renders only with a title", () =>{
act(() => {
render(<ItemViewAppBar />, container);
})
expect(container.ItemViewAppBar).toBe(null);
})
2 changes: 1 addition & 1 deletion src/components/ItemViewAppBar/ItemViewAppBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function ItemViewAppBar(props){

return(
<>
<AppBar position="sticky" color="secondary" elevation={2}>
<AppBar style={{width: "inherit"}} position="fixed" color="secondary" elevation={2}>
<Toolbar variant="dense">
<Tooltip title={"Close Item"}
arrow
Expand Down

0 comments on commit 99d94c3

Please sign in to comment.