mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 21:03:19 +00:00
Make entire collapsible header clickable
- Changed outer div to button element - Added w-full and text-left classes - Now click anywhere on header (icon, text, chevron) to expand/collapse
This commit is contained in:
parent
f646a29d1a
commit
1405c47b50
1 changed files with 5 additions and 7 deletions
|
|
@ -98,17 +98,15 @@ export function renderCollapsibleHeader(
|
|||
: "text-foreground";
|
||||
|
||||
return html`
|
||||
<div class="flex items-center justify-between gap-2 text-sm text-muted-foreground">
|
||||
<button @click=${toggleContent} class="flex items-center justify-between gap-2 text-sm text-muted-foreground w-full text-left hover:text-foreground transition-colors">
|
||||
<div class="flex items-center gap-2">
|
||||
${state === "inprogress" ? statusIcon(Loader, "text-foreground animate-spin") : ""}
|
||||
${statusIcon(toolIcon, toolIconColor)}
|
||||
<span>${text}</span>
|
||||
</div>
|
||||
<button @click=${toggleContent} class="hover:text-foreground transition-colors">
|
||||
<span class="inline-block text-muted-foreground" ${ref(chevronRef)}>
|
||||
${icon(defaultExpanded ? ChevronDown : ChevronRight, "sm")}
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<span class="inline-block text-muted-foreground" ${ref(chevronRef)}>
|
||||
${icon(defaultExpanded ? ChevronDown : ChevronRight, "sm")}
|
||||
</span>
|
||||
</button>
|
||||
`;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue