From cea6035b1be2455da8c8a628b181e911cf29f25c Mon Sep 17 00:00:00 2001 From: zkldi Date: Sat, 31 Jul 2021 00:20:51 +0100 Subject: [PATCH] more push --- .../src/components/layout/header/Topbar.tsx | 7 ++---- .../tables/components/DropdownRow.tsx | 24 +++++++++++++++++++ .../tables/components/SelectableRating.tsx | 9 ++++--- .../src/components/tables/pbs/IIDXPBTable.tsx | 24 +++++++++---------- .../tables/scores/IIDXScoreTable.tsx | 1 + .../src/components/util/table/useZTable.tsx | 2 +- client/src/types/react.ts | 5 ++-- 7 files changed, 48 insertions(+), 24 deletions(-) create mode 100644 client/src/components/tables/components/DropdownRow.tsx diff --git a/client/src/components/layout/header/Topbar.tsx b/client/src/components/layout/header/Topbar.tsx index f88b0784c..bba9889a0 100644 --- a/client/src/components/layout/header/Topbar.tsx +++ b/client/src/components/layout/header/Topbar.tsx @@ -1,7 +1,4 @@ import React, { useContext } from "react"; -import SVG from "react-inlinesvg"; -import { OverlayTrigger, Tooltip } from "react-bootstrap"; -import { toAbsoluteUrl } from "../../../_metronic/_helpers"; import { UserNotificationsDropdown } from "../../../_metronic/layout/components/extras/dropdowns/UserNotificationsDropdown"; import { UserProfileDropdown } from "components/layout/header/UserProfileDropdown"; import { UserContext } from "context/UserContext"; @@ -19,7 +16,7 @@ export function Topbar() { <> - Quick panel} > @@ -42,7 +39,7 @@ export function Topbar() { - + */} diff --git a/client/src/components/tables/components/DropdownRow.tsx b/client/src/components/tables/components/DropdownRow.tsx new file mode 100644 index 000000000..722da5884 --- /dev/null +++ b/client/src/components/tables/components/DropdownRow.tsx @@ -0,0 +1,24 @@ +import React, { useState } from "react"; +import { Collapse } from "react-bootstrap"; +import { JustChildren } from "types/react"; + +export default function DropdownRow({ + children, + dropdown, +}: { dropdown: React.ReactNode } & JustChildren) { + const [showDropdown, setShowDropdown] = useState(false); + return ( + <> + setShowDropdown(!showDropdown)}>{children} + + + +
{dropdown}
+
+ + + {/* Fake row to ensure striping stays consistent */} + + + ); +} diff --git a/client/src/components/tables/components/SelectableRating.tsx b/client/src/components/tables/components/SelectableRating.tsx index 24bf80475..1b655f08b 100644 --- a/client/src/components/tables/components/SelectableRating.tsx +++ b/client/src/components/tables/components/SelectableRating.tsx @@ -8,20 +8,23 @@ import { } from "tachi-common"; import { SetState } from "types/react"; -export default function SelectableRating({ +export default function SelectableRating({ game, playtype, + rating, setRating, }: { game: Game; playtype: Playtypes[Game]; - setRating: SetState; + rating: ScoreCalculatedDataLookup[I]; + setRating: SetState; }) { const gptConfig = GetGamePTConfig(game, playtype); return (