Skip to content

Commit bd82d51

Browse files
Change Bar height to auto (#121)
1 parent b9635ff commit bd82d51

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ SciReactUI Changelog
1010

1111
### Fixed
1212
- Hovering over a slot caused a popup with the slot title in. This has been removed.
13+
- Stopped Bar-based components (e.g. Navbar, Footer) from expanding when a parent component has a set height
1314

1415
### Changed
1516
- Remove first-child css selector as it causes problems with server-side rendering.

src/components/controls/Bar.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe("Bar", () => {
3838
// check new style is set
3939
expect(headerComputedStyle.border).toBe(borderStyle);
4040
// Check default values are still set
41-
expect(headerComputedStyle.height).toBe("100%");
41+
expect(headerComputedStyle.height).toBe("auto");
4242
});
4343
});
4444

src/components/controls/Bar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const Slot = ({ className, style, children }: SlotProps) => (
2626

2727
const BoxStyled = styled(Box)<BoxProps>(({ theme }) => ({
2828
width: "100%",
29-
height: "100%",
29+
height: "auto",
3030
minHeight: "50px",
3131
display: "flex",
3232
alignItems: "center",

src/components/navigation/Navbar.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ describe("Navbar", () => {
2424
expect(headerComputedStyle.border).toBe(borderStyle);
2525

2626
// Check default values are still set
27-
expect(headerComputedStyle.height).toBe("100%");
27+
expect(headerComputedStyle.height).toBe("auto");
2828
});
2929
});
3030

0 commit comments

Comments
 (0)