import React from "react"; import { ListGroup, type ListGroupRootProps, cn } from "heroui-native"; export interface ListGroupItem { value: string; title: string; description?: string; /** Rendered before the title — an icon or an avatar. */ prefix?: React.ReactNode; /** Rendered at the end of the row. Defaults to a chevron when the row is pressable. */ suffix?: React.ReactNode; isDisabled?: boolean; onPress?: () => void; } export interface NListGroupProps extends Omit { items: ListGroupItem[]; itemClassName?: string; titleClassName?: string; descriptionClassName?: string; } export const NListGroup = React.memo( ({ items, className, itemClassName, titleClassName, descriptionClassName, ...props }) => { return ( {items.map((item) => ( {item.prefix && {item.prefix}} {item.title} {item.description && ( {item.description} )} {item.suffix ?? (item.onPress ? : null)} ))} ); }, ); NListGroup.displayName = "NListGroup";