Skip to content

Commit 72c521a

Browse files
fix: new docs fixes
1 parent 38ec6ad commit 72c521a

57 files changed

Lines changed: 265 additions & 115 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/showcase/demo/headless/accordion/basic-demo.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ export default function BasicDemo() {
1818
return (
1919
<div {...accordion.rootProps} className="max-w-md mx-auto">
2020
{items.map(({ panel, title, content }) => (
21-
<div key={title} {...panel.panelProps} className="border-b border-gray-200 dark:border-gray-700">
21+
<div key={title} {...panel.panelProps} className="border-b border-surface-200 dark:border-surface-700">
2222
<div {...panel.headerProps}>
2323
<button
2424
{...panel.triggerProps}
25-
className="flex items-center justify-between w-full py-3 px-4 text-left cursor-pointer hover:bg-gray-50 transition focus-visible:outline-1 focus-visible:-outline-offset-1 focus-visible:outline-primary"
25+
className="flex items-center justify-between w-full py-3 px-4 text-left cursor-pointer text-muted-color hover:text-color transition focus-visible:outline-1 focus-visible:-outline-offset-1 focus-visible:outline-primary"
2626
>
2727
<span>{title}</span>
2828
<span
@@ -35,7 +35,7 @@ export default function BasicDemo() {
3535
</button>
3636
</div>
3737
{panel.state.open && (
38-
<div {...panel.contentProps} className="px-4 pb-3 text-gray-600 dark:text-gray-300 text-sm">
38+
<div {...panel.contentProps} className="px-4 pb-3 text-surface-600 dark:text-surface-300 text-sm">
3939
{content}
4040
</div>
4141
)}

apps/showcase/docs/headless/accordion/features.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const { panelProps, headerProps, triggerProps, contentProps, indicatorProps, sta
2626
<span {...indicatorProps} />
2727
</button>
2828
</div>
29-
{state.open && <div {...contentProps}>...</div>}
29+
{state.open && <div {...contentProps}></div>}
3030
</div>
3131
</div>;
3232
```

apps/showcase/docs/headless/autocomplete/features.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const { rootProps, inputProps, triggerProps, listProps, positionerProps, popupPr
1616

1717
<div {...rootProps}>
1818
<input {...inputProps} />
19-
<button {...triggerProps}>Toggle</button>
19+
<button {...triggerProps}></button>
2020
<div {...positionerProps}>
2121
<div {...popupProps}>
2222
<ul {...listProps}>...</ul>

apps/showcase/docs/headless/avatar/features.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ React.useEffect(() => {
1919
return () => handleImageUnload();
2020
}, []);
2121

22-
<div {...rootProps}>{state.load ? <img src="..." /> : <span>AB</span>}</div>;
22+
<div {...rootProps}>{state.load ? <img src="..." /> : <span></span>}</div>;
2323
```
2424

2525
`useAvatar` manages the image loading lifecycle while `useAvatarGroup` provides root props for grouping — see [Primitives](/docs/primitives/avatar) for a component-based API.

apps/showcase/docs/headless/badge/features.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { useBadge } from '@primereact/headless/badge';
1313

1414
const { rootProps } = useBadge();
1515

16-
<span {...rootProps}>4</span>;
16+
<span {...rootProps}></span>;
1717
```
1818

1919
`useBadge` returns spread-ready `rootProps` with data attributes for styling — see [Primitives](/docs/primitives/badge) for a component-based API.

apps/showcase/docs/headless/button/features.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { useButton } from '@primereact/headless/button';
1313

1414
const { rootProps } = useButton();
1515

16-
<button {...rootProps}>Submit</button>;
16+
<button {...rootProps}></button>;
1717
```
1818

1919
`useButton` returns spread-ready `rootProps` with data attributes for styling — see [Primitives](/docs/primitives/button) for a component-based API.

apps/showcase/docs/headless/card/features.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import { useCard } from '@primereact/headless/card';
1414
const { rootProps } = useCard();
1515

1616
<div {...rootProps}>
17-
<div>Title</div>
18-
<p>Content goes here.</p>
17+
<div></div>
18+
<p></p>
1919
</div>;
2020
```
2121

apps/showcase/docs/headless/checkbox/features.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const { rootProps, inputProps, boxProps, indicatorProps, state } = useCheckbox({
1717

1818
<div {...rootProps}>
1919
<input {...inputProps} className="sr-only" />
20-
<div {...boxProps}>{state.checked && <span {...indicatorProps}></span>}</div>
20+
<div {...boxProps}>{state.checked && <span {...indicatorProps}></span>}</div>
2121
</div>;
2222
```
2323

apps/showcase/docs/headless/chip/features.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ const { rootProps, removeProps, state, close } = useChip({ onRemove: (e) => {} }
1616
{
1717
state.visible && (
1818
<div {...rootProps}>
19-
<span>Label</span>
20-
<span {...removeProps}>x</span>
19+
<span></span>
20+
<span {...removeProps}></span>
2121
</div>
2222
);
2323
}

apps/showcase/docs/headless/commandmenu/features.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const commandmenu = useCommandMenu({
2323
<input {...commandmenu.inputProps} />
2424
<ul {...commandmenu.listProps}>
2525
{commandmenu.filteredOptions.map((item, index) => (
26-
<li {...commandmenu.getItemProps(item, index)}>...</li>
26+
<li {...commandmenu.getItemProps(item, index)}></li>
2727
))}
2828
</ul>
2929
</div>;

0 commit comments

Comments
 (0)