Fix incorrect overflow
This commit is contained in:
parent
e96b1b8eae
commit
324469259d
|
@ -9,18 +9,19 @@ export function TodoList(
|
||||||
{ user: { avatarUrl, assignedTodos, name, color } }: Props,
|
{ user: { avatarUrl, assignedTodos, name, color } }: Props,
|
||||||
) {
|
) {
|
||||||
const todoItem = (
|
const todoItem = (
|
||||||
{ classList, description }: Pick<Todo, 'description'> & {
|
{ className, description, hideDone }: Pick<Todo, 'description'> & {
|
||||||
classList?: string
|
className?: string
|
||||||
|
hideDone?: boolean
|
||||||
},
|
},
|
||||||
) => (
|
) => (
|
||||||
<li
|
<li
|
||||||
style={`border-color: #${color}`}
|
style={`border-color: #${color}`}
|
||||||
class={`${
|
class={`${
|
||||||
classList || ''
|
className || ''
|
||||||
} border-l-4 p-4 rounded drop-shadow-lg bg-white dark:bg-stone-900 flex flex-col`}
|
} border-l-4 p-4 rounded drop-shadow-lg bg-white dark:bg-stone-900 flex flex-col`}
|
||||||
>
|
>
|
||||||
<span class='text-xl'>{description}</span>
|
<span class='text-xl'>{description}</span>
|
||||||
<Button class='mt-2'>Done</Button>
|
{hideDone ? '' : <Button class='mt-2'>Done</Button>}
|
||||||
</li>
|
</li>
|
||||||
)
|
)
|
||||||
return (
|
return (
|
||||||
|
@ -38,7 +39,11 @@ export function TodoList(
|
||||||
</button>
|
</button>
|
||||||
<ul class='flex flex-col gap-y-4'>
|
<ul class='flex flex-col gap-y-4'>
|
||||||
{assignedTodos.length < 1
|
{assignedTodos.length < 1
|
||||||
? todoItem({ description: 'All clear! 🎉', classList: 'text-center' })
|
? todoItem({
|
||||||
|
description: 'All clear! 🎉',
|
||||||
|
className: 'text-center',
|
||||||
|
hideDone: true,
|
||||||
|
})
|
||||||
: assignedTodos.map(todoItem)}
|
: assignedTodos.map(todoItem)}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -37,7 +37,7 @@ export default function Home(
|
||||||
<h1 class='p-5 border-b-2 border-stone-500/20 text-2xl'>
|
<h1 class='p-5 border-b-2 border-stone-500/20 text-2xl'>
|
||||||
Todos
|
Todos
|
||||||
</h1>
|
</h1>
|
||||||
<ul class='p-4 relative flex'>
|
<ul class='p-4 relative flex overflow-x-scroll max-w-screen'>
|
||||||
<li>
|
<li>
|
||||||
<TodoList user={unassignedUser} />
|
<TodoList user={unassignedUser} />
|
||||||
</li>
|
</li>
|
||||||
|
|
Loading…
Reference in a new issue