mirror of
https://git.rezel.net/LudoTech/traque.git
synced 2026-02-09 10:20:16 +01:00
Scrollable team list
This commit is contained in:
14
traque-front/components/list.jsx
Normal file
14
traque-front/components/list.jsx
Normal file
@@ -0,0 +1,14 @@
|
||||
export function List({array, children}) {
|
||||
// The elements of array have to be identified by a field id
|
||||
return (
|
||||
<div className='w-full h-full bg-gray-300 overflow-y-auto'>
|
||||
<ul className="w-full p-1 divide-y-4 divide-gray-300">
|
||||
{array.map((elem, i) => (
|
||||
<li className="w-full" key={elem.id}>
|
||||
{children(elem, i)}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user