UI: better style groups, make header sticky

This commit is contained in:
Pieter Vander Vennet 2025-04-21 23:44:11 +02:00
parent 20f005693d
commit 1bd060df82
4 changed files with 124 additions and 2 deletions

View file

@ -3,7 +3,7 @@
export let expanded = false
export let noBorder = false
export let contentClass = noBorder ? "normal-background" : "low-interaction rounded-b p-2"
export let contentClass = noBorder ? "normal-background" : "low-interaction rounded-b p-2 border-x-2 border-b-2 border-dashed border-low-interaction"
let defaultClass: string = undefined
if (noBorder) {
defaultClass = "unstyled w-full flex-grow"
@ -11,7 +11,8 @@
</script>
<Accordion>
<AccordionItem open={expanded} paddingDefault="p-0" inactiveClass="text-black" {defaultClass}>
<AccordionItem open={expanded} paddingDefault="p-0" inactiveClass="text-black"
{defaultClass}>
<span slot="header" class={!noBorder ? "w-full p-2 text-base" : "w-full"}>
<slot name="header" />
</span>