mirror of
https://git.rezel.net/LudoTech/traque.git
synced 2026-02-09 02:10:18 +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>
|
||||
);
|
||||
}
|
||||
@@ -1,12 +1,14 @@
|
||||
export function Section({title, className, children}) {
|
||||
export function Section({title, outerClassName, innerClassName, children}) {
|
||||
return (
|
||||
<div className={className}>
|
||||
<div className={outerClassName}>
|
||||
<div className='w-full h-full flex flex-col shadow-2xl'>
|
||||
<div className='w-full p-1 bg-custom-light-blue text-center'>
|
||||
<h2 className="text-l">{title}</h2>
|
||||
</div>
|
||||
<div className='w-full h-full p-3 bg-white'>
|
||||
{children}
|
||||
<div className='w-full flex-1 min-h-0 p-3 bg-white'>
|
||||
<div className={`w-full h-full ${innerClassName}`}>
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user