Skip to content

Commit

Permalink
fix: menu header spacing
Browse files Browse the repository at this point in the history
Signed-off-by: rare-magma <[email protected]>
  • Loading branch information
rare-magma committed Jul 25, 2024
1 parent 935c53f commit 9e5d1a5
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions src/components/NavBar/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ export interface SearchOption {

export function NavBar() {
const searchRef = useRef<TypeaheadRef>(null);
const nameRef =
useRef<HTMLInputElement>() as React.MutableRefObject<HTMLInputElement>;
const nameRef = useRef<HTMLInputElement>() as React.MutableRefObject<
HTMLInputElement
>;
const deleteButtonRef = useRef<HTMLButtonElement>(null);

const [expanded, setExpanded] = useState(false);
Expand Down Expand Up @@ -97,8 +98,9 @@ export function NavBar() {
setTheme("dark");
}

mediaQueryList.addEventListener("change", (event) =>
setTheme(event.matches ? "dark" : "light"),
mediaQueryList.addEventListener(
"change",
(event) => setTheme(event.matches ? "dark" : "light"),
);
}, []);

Expand Down Expand Up @@ -238,7 +240,9 @@ export function NavBar() {
placement="end"
show={expanded}
>
<Offcanvas.Header>
<Offcanvas.Header
style={{ justifyContent: "space-between" }}
>
<Offcanvas.Title id={`offcanvasNavbarLabel-expand-md`}>
{budget?.name ?? "guitos"}
</Offcanvas.Title>
Expand Down Expand Up @@ -285,13 +289,11 @@ export function NavBar() {
buttonAriaLabel={"undo change"}
buttonClassName="w-100"
buttonVariant={"outline-info"}
buttonIcon={
expanded ? (
buttonIcon={expanded
? (
"undo"
) : (
<BsArrowCounterclockwise aria-hidden />
)
}
: <BsArrowCounterclockwise aria-hidden />}
/>

<NavBarItem
Expand All @@ -303,9 +305,9 @@ export function NavBar() {
buttonAriaLabel={"redo change"}
buttonClassName="w-100"
buttonVariant={"outline-info"}
buttonIcon={
expanded ? "redo" : <BsArrowClockwise aria-hidden />
}
buttonIcon={expanded
? "redo"
: <BsArrowClockwise aria-hidden />}
/>
</>
)}
Expand Down Expand Up @@ -358,9 +360,9 @@ export function NavBar() {
buttonClassName="w-100"
buttonVariant={"outline-info"}
buttonLink="https://github.com/rare-magma/guitos#getting-started"
buttonIcon={
expanded ? "instructions" : <BsQuestionLg aria-hidden />
}
buttonIcon={expanded
? "instructions"
: <BsQuestionLg aria-hidden />}
target="_blank"
/>
</Nav>
Expand Down

0 comments on commit 9e5d1a5

Please sign in to comment.