import { Fragment, type ReactNode } from 'react' import { connect, type KeyValueItem, type KeyValueListProps as CoreKeyValueListProps } from '@ggary/core/kv' import { reactNormalizer } from '@ggary/core' export interface KeyValueListProps extends CoreKeyValueListProps { /** The pairs, in reading order. A value may be any node: a badge, a link, a time. */ items: KeyValueItem[] } export function KeyValueList({ items, tight }: KeyValueListProps) { const api = connect({ tight }, reactNormalizer) return (
{items.map((item, index) => ( // A name may repeat within one object's list, so the position keys it.
{item.label}
{item.value}
))}
) }