MCPcopy Create free account
hub / github.com/adobe/react-spectrum / ListBoxItem

Function ListBoxItem

starters/docs/src/ListBox.tsx:23–33  ·  view source on GitHub ↗
(props: ListBoxItemProps)

Source from the content-addressed store, hash-verified

21}
22
23export function ListBoxItem(props: ListBoxItemProps) {
24 let textValue =
25 props.textValue || (typeof props.children === 'string' ? props.children : undefined);
26 return (
27 <AriaListBoxItem {...props} textValue={textValue}>
28 {composeRenderProps(props.children, children =>
29 typeof children === 'string' ? <Text slot="label">{children}</Text> : children
30 )}
31 </AriaListBoxItem>
32 );
33}
34
35export function ListBoxSection<T>(props: ListBoxSectionProps<T>) {
36 return <AriaListBoxSection {...props} />;

Callers

nothing calls this directly

Calls 1

composeRenderPropsFunction · 0.85

Tested by

no test coverage detected