From 714e0a4517685dd84c32dfb419e8c208c4e95c8f Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu, 22 Jun 2023 10:04:12 -0700 Subject: [PATCH] Use Disclosure component for collapsible service groups, add transition hide collapse arrow if disabled dont break layout for icons in group title no-shadow --- src/components/services/group.jsx | 37 ++++++++++++++++++++++--------- tailwind.config.js | 5 +++++ 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/src/components/services/group.jsx b/src/components/services/group.jsx index 49a44de41..2f94fc77f 100644 --- a/src/components/services/group.jsx +++ b/src/components/services/group.jsx @@ -1,14 +1,12 @@ import classNames from "classnames"; -import { Transition } from '@headlessui/react' -import { useState } from 'react' +import { Disclosure, Transition } from '@headlessui/react'; +import { MdKeyboardArrowDown } from "react-icons/md"; import List from "components/services/list"; import ResolvedIcon from "components/resolvedicon"; export default function ServicesGroup({ group, services, layout, fiveColumns, disableCollapse}) { - const [isShowing, setIsShowing] = useState(true) - return (
-
- {/* eslint-disable-next-line no-shadow */} - -
- + + + + + + + + + )} +
); } diff --git a/tailwind.config.js b/tailwind.config.js index b981051b7..a075f6e94 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -9,6 +9,11 @@ module.exports = { "./src/components/**/*.{js,ts,jsx,tsx}", "./src/widgets/**/*.{js,ts,jsx,tsx}", ], + variants: { + extend: { + display: ["group-hover"], + }, + }, theme: { extend: { colors: {