Skip to content

Commit

Permalink
Use haddock3-ui@0.2.2 + force right theme
Browse files Browse the repository at this point in the history
  • Loading branch information
sverhoeven committed Sep 16, 2024
1 parent 0a19fbb commit 8c221dd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion app/caprieval/CaprievalReport.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { ScatterPlots } from "./ScatterPlots";
import { useSearchParams } from "@remix-run/react";
import { BoxPlots } from "./BoxPlots";
import type { CaprievalData } from "./caprieval.server";
import { useTheme } from "remix-themes";

/*
* Component has to be client only due
Expand All @@ -13,11 +14,13 @@ import type { CaprievalData } from "./caprieval.server";

export const CaprievalReport = ({ scatters, boxes, table }: CaprievalData) => {
const [searchParams, setSearchParams] = useSearchParams();
const [theme] = useTheme();
const style = { colorScheme: theme === "dark" ? "dark" : "light" };
const hasOtherCluster =
"clusters" in table &&
table.clusters.some((c) => c["cluster_id"] === "Other");
return (
<div className="caprieval-report flex flex-col gap-4">
<div className="caprieval-report flex flex-col gap-4" style={style}>
{"clusters" in table ? (
<ClusterTable {...table} />
) : (
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"/coverage"
],
"dependencies": {
"@i-vresse/haddock3-ui": "^0.2.1",
"@i-vresse/haddock3-ui": "^0.2.2",
"@i-vresse/wb-core": "^3.2.1",
"@i-vresse/wb-form": "^2.0.1",
"@radix-ui/react-checkbox": "^1.0.4",
Expand Down

0 comments on commit 8c221dd

Please sign in to comment.