(props: ListBoxItemProps)
| 46 | }); |
| 47 | |
| 48 | export function ListBoxItem(props: ListBoxItemProps) { |
| 49 | let textValue = |
| 50 | props.textValue || (typeof props.children === 'string' ? props.children : undefined); |
| 51 | return ( |
| 52 | <AriaListBoxItem {...props} textValue={textValue} className={itemStyles}> |
| 53 | {composeRenderProps(props.children, children => ( |
| 54 | <> |
| 55 | {children} |
| 56 | <div className="absolute left-4 right-4 bottom-0 h-px bg-white/20 forced-colors:bg-[HighlightText] hidden [.group[data-selected]:has(+[data-selected])_&]:block" /> |
| 57 | </> |
| 58 | ))} |
| 59 | </AriaListBoxItem> |
| 60 | ); |
| 61 | } |
| 62 | |
| 63 | export const dropdownItemStyles = tv({ |
| 64 | base: 'group flex items-center gap-4 cursor-default select-none py-2 pl-3 pr-3 selected:pr-1 rounded-lg outline outline-0 text-sm forced-color-adjust-none no-underline [&[href]]:cursor-pointer [-webkit-tap-highlight-color:transparent]', |
nothing calls this directly
no test coverage detected