Skip to content

Commit bf0dbcc

Browse files
Quick 'n dirty GitHub link.
We probably want to go further to break up the header, like: * Contact (opens dialog) * Email * GitHub * Settings (opens dialog) * Currency format But I don't feel like figuring out the dialogs right now, so here's a stopgap.
1 parent 373d91b commit bf0dbcc

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

src/Header.tsx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Redo2, Undo2 } from "lucide-react";
22
import { useCallback } from "react";
33
import { ActionCreators as ReduxUndoActionCreators } from "redux-undo";
44

5+
import { A } from "./components/A";
56
import { Button } from "./components/inputs/Button";
67
import { Select } from "./components/inputs/Select";
78
import { CURRENCY_CODES } from "./currencyFormatting";
@@ -10,11 +11,16 @@ import { useAppDispatch, useAppSelector } from "./redux/typedHooks";
1011
import { useUndoRedoShortcuts } from "./useUndoRedoShortcuts";
1112

1213
export function Header(): React.JSX.Element {
13-
// TODO: Title, about, contact, and stuff currency dropdown into a settings dialog
1414
return (
15-
<header className="flex items-center justify-between gap-8">
16-
<UndoRedoButtons />
17-
<CurrencySelector />
15+
<header className="flex items-center justify-between gap-4">
16+
<div className="flex items-center gap-4">
17+
<h1 className="text-lg font-semibold">YNAB Diff</h1>
18+
<A href="https://github.com/SyntaxColoring/ynab-diff">Source code</A>
19+
</div>
20+
<div className="flex items-center gap-4">
21+
<UndoRedoButtons />
22+
<CurrencySelector />
23+
</div>
1824
</header>
1925
);
2026
}
@@ -39,7 +45,7 @@ function UndoRedoButtons(): React.JSX.Element {
3945
});
4046

4147
return (
42-
<div className="flex gap-2">
48+
<div className="flex gap-1">
4349
<Button
4450
type="button"
4551
variant="secondary"
@@ -77,7 +83,7 @@ function CurrencySelector(): React.JSX.Element {
7783
const currencyCode = useAppSelector((state) => state.present.currencyFormat);
7884

7985
return (
80-
<label className="flex items-baseline gap-2">
86+
<label className="flex items-center gap-2">
8187
<span>Currency format</span>
8288
<Select
8389
options={CURRENCY_CODES}

0 commit comments

Comments
 (0)