From 7d7bf9ed4c00ac4dd5f5ad254206e7130e63e596 Mon Sep 17 00:00:00 2001
From: martylukyy <35452459+martylukyy@users.noreply.github.com>
Date: Mon, 12 Aug 2024 20:36:45 +0200
Subject: [PATCH] refactor(web): update deprecated HeadlessUI v2 components
(#1580)
* refactor(web): move away from old headless UI dot notation
* refactor(web): refactor `Disclosure` component
* refactor(web): rename formik's `Field` to `FormikField` and keep original HeadlessUI component names
---
web/src/components/Checkbox.tsx | 14 ++---
web/src/components/header/Header.tsx | 6 +-
web/src/components/header/MobileNav.tsx | 8 +--
web/src/components/header/RightNav.tsx | 22 +++----
web/src/components/inputs/input_wide.tsx | 36 +++++------
web/src/components/inputs/radio.tsx | 18 +++---
web/src/components/inputs/select.tsx | 62 +++++++++----------
web/src/components/inputs/switch.tsx | 20 +++---
web/src/screens/Logs.tsx | 22 +++----
web/src/screens/filters/List.tsx | 67 ++++++++++++---------
web/src/screens/releases/ReleaseFilters.tsx | 14 ++---
web/src/screens/settings/Feed.tsx | 34 +++++------
web/src/screens/settings/Irc.tsx | 38 ++++++------
13 files changed, 185 insertions(+), 176 deletions(-)
diff --git a/web/src/components/Checkbox.tsx b/web/src/components/Checkbox.tsx
index b53bddc..e033ac6 100644
--- a/web/src/components/Checkbox.tsx
+++ b/web/src/components/Checkbox.tsx
@@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/
-import { Switch } from "@headlessui/react";
+import { Switch, Field, Label, Description } from "@headlessui/react";
import { classNames } from "@utils";
interface CheckboxProps {
@@ -23,7 +23,7 @@ export const Checkbox = ({
setValue,
disabled
}: CheckboxProps) => (
-