Merge pull request #1783 from benphelps/hidden-headers

allow hiding section headers
pull/1789/head
shamoon 11 months ago committed by GitHub
commit 5611baa0b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -16,12 +16,13 @@ export default function ServicesGroup({ group, services, layout, fiveColumns, di
className={classNames(
layout?.style === "row" ? "basis-full" : "basis-full md:basis-1/2 lg:basis-1/3 xl:basis-1/4",
layout?.style !== "row" && fiveColumns ? "3xl:basis-1/5" : "",
"flex-1 p-1"
layout?.header === false ? "flex-1 px-1 -my-1" : "flex-1 p-1",
)}
>
<Disclosure defaultOpen>
{({ open }) => (
<>
{ layout?.header !== false &&
<Disclosure.Button disabled={disableCollapse} className="flex w-full select-none items-center group">
{layout?.icon &&
<div className="flex-shrink-0 mr-2 w-7 h-7">
@ -35,6 +36,7 @@ export default function ServicesGroup({ group, services, layout, fiveColumns, di
open ? '' : 'rotate-90'
)} />
</Disclosure.Button>
}
<Transition
// Otherwise the transition group does display: none and cancels animation
className="!block"

Loading…
Cancel
Save