mirror of
https://github.com/karl0ss/homepage.git
synced 2025-05-06 07:23:38 +01:00
allow hiding section headers
This commit is contained in:
parent
15bf55952b
commit
167ecb42de
@ -16,12 +16,13 @@ export default function ServicesGroup({ group, services, layout, fiveColumns, di
|
|||||||
className={classNames(
|
className={classNames(
|
||||||
layout?.style === "row" ? "basis-full" : "basis-full md:basis-1/2 lg:basis-1/3 xl:basis-1/4",
|
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" : "",
|
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>
|
<Disclosure defaultOpen>
|
||||||
{({ open }) => (
|
{({ open }) => (
|
||||||
<>
|
<>
|
||||||
|
{ layout?.header !== false &&
|
||||||
<Disclosure.Button disabled={disableCollapse} className="flex w-full select-none items-center group">
|
<Disclosure.Button disabled={disableCollapse} className="flex w-full select-none items-center group">
|
||||||
{layout?.icon &&
|
{layout?.icon &&
|
||||||
<div className="flex-shrink-0 mr-2 w-7 h-7">
|
<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'
|
open ? '' : 'rotate-90'
|
||||||
)} />
|
)} />
|
||||||
</Disclosure.Button>
|
</Disclosure.Button>
|
||||||
|
}
|
||||||
<Transition
|
<Transition
|
||||||
// Otherwise the transition group does display: none and cancels animation
|
// Otherwise the transition group does display: none and cancels animation
|
||||||
className="!block"
|
className="!block"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user