mirror of
https://github.com/rjNemo/melon_frontend
synced 2026-06-06 02:16:45 +00:00
7 lines
229 B
TypeScript
7 lines
229 B
TypeScript
import { ReactNode } from "react";
|
|
|
|
type ListProps<T> = { items: T[]; render: (item: T) => ReactNode };
|
|
|
|
export default function List<T>({ items, render }: ListProps<T>) {
|
|
return <ul>{items.map((item) => render(item))}</ul>;
|
|
}
|