Skip to content

Commit bc8b011

Browse files
authored
fix: re-add color mode button (#154)
1 parent dcbf9ea commit bc8b011

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/components/overlay.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import type { StacCatalog, StacCollection, StacItem } from "stac-ts";
1212
import Breadcrumbs from "./breadcrumbs";
1313
import { Examples } from "./examples";
1414
import Panel from "./panel";
15+
import { ColorModeButton } from "./ui/color-mode";
1516
import type { BBox2D } from "../types/map";
1617
import type { DatetimeBounds, StacValue } from "../types/stac";
1718

@@ -103,6 +104,7 @@ export default function Overlay({
103104
Examples
104105
</Button>
105106
</Examples>
107+
<ColorModeButton />
106108
</HStack>
107109
</GridItem>
108110
</SimpleGrid>

tests/app.spec.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ describe("app", () => {
3636
.toBeVisible();
3737
});
3838

39+
test("has a color mode button", async () => {
40+
const app = renderApp();
41+
await expect
42+
.element(app.getByRole("button", { name: "Toggle color mode" }))
43+
.toBeVisible();
44+
});
45+
3946
describe.for(EXAMPLES)("example $title", ({ title }) => {
4047
test("updates title", async ({ expect }) => {
4148
const app = renderApp();

0 commit comments

Comments
 (0)