(props: ListBoxItemProps)
| 84 | }); |
| 85 | |
| 86 | export function DropdownItem(props: ListBoxItemProps) { |
| 87 | let textValue = |
| 88 | props.textValue || (typeof props.children === 'string' ? props.children : undefined); |
| 89 | return ( |
| 90 | <AriaListBoxItem {...props} textValue={textValue} className={dropdownItemStyles}> |
| 91 | {composeRenderProps(props.children, (children, {isSelected}) => ( |
| 92 | <> |
| 93 | <span className="flex items-center flex-1 gap-2 font-normal truncate group-selected:font-semibold"> |
| 94 | {children} |
| 95 | </span> |
| 96 | <span className="flex items-center w-5"> |
| 97 | {isSelected && <Check className="w-4 h-4" />} |
| 98 | </span> |
| 99 | </> |
| 100 | ))} |
| 101 | </AriaListBoxItem> |
| 102 | ); |
| 103 | } |
| 104 | |
| 105 | export interface DropdownSectionProps<T> extends ListBoxSectionProps<T> { |
| 106 | title?: string; |
nothing calls this directly
no test coverage detected