Skip to content

Commit 8f68254

Browse files
committed
refactor: update accordion doc and demo
1 parent c64f5a0 commit 8f68254

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

apps/showcase/demo/styled/accordion/trigger-demo.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import { Minus } from '@primeicons/react/minus';
33
import { Plus } from '@primeicons/react/plus';
44
import { Accordion } from '@primereact/ui/accordion';
5+
import { Button } from '@primereact/ui/button';
56

67
export default function TriggerDemo() {
78
return (
@@ -27,7 +28,7 @@ export default function TriggerDemo() {
2728
<p>Is my data secure?</p>
2829
<small className="text-surface-500">Only the icon is clickable in this example.</small>
2930
</div>
30-
<Accordion.Trigger className="mr-2 inline-flex size-8 items-center justify-center rounded-full border hover:bg-surface-100 focus-visible:outline-2">
31+
<Accordion.Trigger as={Button} variant="outlined" rounded className="mr-2 size-8">
3132
<Accordion.Indicator match="open">
3233
<Minus />
3334
</Accordion.Indicator>

apps/showcase/demo/styled/accordion/with-radiobutton-demo.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ export default function WithRadioButtonDemo() {
6060
</span>
6161
<span className="font-semibold text-base">{item.price}</span>
6262
</Accordion.Header>
63-
<Accordion.Content className="bg-transparent px-4 leading-6 pl-12.5">
63+
<Accordion.Content
64+
className="bg-transparent px-4 leading-6 pl-12.5"
65+
pt-pccollapsible-content={{ inner: { className: 'bg-transparent' } }}
66+
>
6467
<p className="text-sm">{item.description}</p>
6568
</Accordion.Content>
6669
</Accordion.Panel>

apps/showcase/docs/styled/components/accordion/features.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Create accordion panels dynamically by iterating over a data source to keep stru
9090

9191
Accordion headers are buttons. They use `aria-controls` to reference the content region and `aria-expanded` to reflect visibility state. The announced label can be customized with `aria-label` or `aria-labelledby` via pt.
9292

93-
The content uses `role="region"` and an `id` that matches the header button's `aria-controls`. It also uses `aria-labelledby` to reference the header id.
93+
The content uses `role="region"` and an `id` that matches the header button's `aria-controls`.
9494

9595
### Header Keyboard Support
9696

0 commit comments

Comments
 (0)