Skip to content

Commit 192437e

Browse files
committed
[docs] Restore combobox wrapper docs
1 parent 98a731d commit 192437e

3 files changed

Lines changed: 4 additions & 21 deletions

File tree

docs/src/app/(docs)/react/components/combobox/page.mdx

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -168,29 +168,12 @@ import { Combobox } from '@base-ui/react/combobox';
168168

169169
export function MyCombobox<Value, Multiple extends boolean | undefined = false>(
170170
props: Combobox.Root.Props<Value, Multiple>,
171-
): React.JSX.Element;
172-
export function MyCombobox(props: Combobox.Root.Props<any, any>): React.JSX.Element {
171+
): React.JSX.Element {
173172
return <Combobox.Root {...props}>{/* ... */}</Combobox.Root>;
174173
}
175174
```
176175

177-
Forward the `Items` generic as well when the wrapper should support keyed `{ value, label }` items:
178-
179-
```tsx title="Wrapper that also supports keyed values"
180-
import * as React from 'react';
181-
import { Combobox } from '@base-ui/react/combobox';
182-
183-
type KeyedItems<Value> = readonly Value[] | readonly { value: Value; label: string }[] | undefined;
184-
185-
export function MyKeyedCombobox<
186-
Value,
187-
Multiple extends boolean | undefined = false,
188-
Items extends KeyedItems<Value> = readonly Value[] | undefined,
189-
>(props: Combobox.Root.Props<Value, Multiple, Items>): React.JSX.Element;
190-
export function MyKeyedCombobox(props: Combobox.Root.Props<any, any, any>): React.JSX.Element {
191-
return <Combobox.Root {...props}>{/* ... */}</Combobox.Root>;
192-
}
193-
```
176+
If the wrapper should also support keyed `{ value, label }` items, forward the third `Items` generic as well.
194177

195178
### Multiple select
196179

docs/src/app/(docs)/react/utils/csp-provider/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Subtitle>Configures CSP-related behavior for inline tags rendered by Base UI components.</Subtitle>
44
<Meta
55
name="description"
6-
content="A CSP provider component that applies a nonce to inline <style> and <script> tags rendered by Base UI components, and can disable inline <style> elements."
6+
content="A CSP provider component that applies a nonce to inline style and script tags rendered by Base UI components, and can disable inline style elements."
77
/>
88

99
## Anatomy

docs/src/app/(docs)/react/utils/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
## CSP Provider
1414

15-
A CSP provider component that applies a nonce to inline <style> and <script> tags rendered by Base UI components, and can disable inline <style> elements.
15+
A CSP provider component that applies a nonce to inline style and script tags rendered by Base UI components, and can disable inline style elements.
1616

1717
<details>
1818

0 commit comments

Comments
 (0)