using native html

This commit is contained in:
2025-04-30 19:50:12 -03:00
parent 4a4c5ef32a
commit fa21aad65a
4 changed files with 9 additions and 15 deletions

View File

@@ -2,14 +2,12 @@
import { Icon } from "astro-icon/components";
---
<div
<summary
class="cursor-pointer flex items-center justify-between px-5 gap-3 py-3"
x-on:click="open = ! open"
>
<slot />
<Icon
name="chevron-down"
class="size-4 fill-white/60 group-data-[hover]:fill-white/50 shrink-0 transition duration-300"
:class="{'-rotate-180': open === true}"
class="size-4 fill-white/60 group-data-[hover]:fill-white/50 shrink-0 transition duration-300 group-open:-rotate-180"
/>
</div>
</summary>