Skip to content

Commit

Permalink
fix(Accordion): style disclosure div after #1199
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincanac committed Feb 6, 2024
1 parent a297c3b commit 882247e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/runtime/components/elements/Accordion.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
<template>
<div :class="ui.wrapper">
<HDisclosure v-for="(item, index) in items" v-slot="{ open, close }" :key="index" as="div" :default-open="defaultOpen || item.defaultOpen">
<HDisclosure
v-for="(item, index) in items"
v-slot="{ open, close }"
:key="index"
as="div"
:class="ui.container"
:default-open="defaultOpen || item.defaultOpen"
>
<HDisclosureButton
:ref="() => buttonRefs[index] = { open, close }"
as="template"
Expand Down
1 change: 1 addition & 0 deletions src/runtime/ui.config/elements/accordion.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export default {
wrapper: 'w-full flex flex-col',
container: 'w-full flex flex-col',
item: {
base: '',
size: 'text-sm',
Expand Down

0 comments on commit 882247e

Please sign in to comment.