Skip to content

Commit df52cc7

Browse files
nikoshellegeakman
andauthored
1 parent 175b1af commit df52cc7

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/components/accordion/accordion.astro

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,27 @@ export interface Props {
77
const { title, id } = Astro.props;
88
---
99

10-
<details class="group mb-4" id={id} data-faq>
10+
<details class="group mb-4 md:w-[65ch]" id={id} data-faq>
1111
<summary
1212
aria-expanded="false"
1313
aria-controls={id}
14-
class="cursor-pointer flex justify-between p-2 rounded-md border-t border-b focus:ring-2"
14+
class="cursor-pointer flex justify-between p-2 bg-[#d4d5e5] focus:ring-2"
1515
>
1616
<span class="font-semibold">{title}</span>
17-
<span aria-hidden="true" class="group-open:hidden">+</span>
18-
<span aria-hidden="true" class="group-open:block hidden">−</span>
17+
<span aria-hidden="true" class="group-open:hidden arrow">▼</span>
18+
<span aria-hidden="true" class="group-open:block hidden arrow">▲</span>
1919
</summary>
2020

2121
<div class="pl-4">
2222
<slot />
2323
</div>
2424
</details>
25-
25+
<style>
26+
.arrow {
27+
font-size:25px;
28+
line-height: 1.25;
29+
}
30+
</style>
2631
<script>
2732
document.addEventListener("DOMContentLoaded", () => {
2833
const hash = window.location.hash.substring(1); // Remove #

0 commit comments

Comments
 (0)