Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/components/ui/accordion/accordion-content.astro
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ const slot = await Astro.slots.render("default")
slot?.trim().length > 0 && (
<div
data-slot="accordion-content"
class={cn("overflow-hidden text-sm", "pt-0 pb-4", className)}
class={cn(
"text-sm",
"pt-0 pb-4",
className
)}
{...props}
>
<Fragment set:html={slot} />
Expand Down
13 changes: 12 additions & 1 deletion src/components/ui/accordion/accordion-item.astro
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,22 @@ const slot = await Astro.slots.render("default")
slot?.trim().length > 0 && (
<details
data-slot="accordion-item"
class={cn("border-b last:border-b-0", "group", className)}
class={cn(
"border-b last:border-b-0",
"group",
"details-content:h-0 open:details-content:h-auto",
"details-content:ease-out",
"details-content:duration-200",
"details-content:overflow-hidden",
"details-content:transition-discrete",
"details-content:transition-[height,content-visibility]",
className
)}
open={open}
{...props}
>
<Fragment set:html={slot} />
</details>
)
}

6 changes: 5 additions & 1 deletion src/components/ui/accordion/accordion.astro
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ const slot = await Astro.slots.render("default")

{
slot?.trim().length > 0 && (
<div data-slot="accordion" class={cn("w-full", className)} {...props}>
<div
data-slot="accordion"
class={cn("w-full [interpolate-size:allow-keywords]", className)}
{...props}
>
<Fragment set:html={slot} />
</div>
)
Expand Down