Expand better
This commit is contained in:
parent
d2341cdc52
commit
9938f47976
|
@ -2,6 +2,8 @@ import { Todo, UserWithTodos } from '@homeman/models.ts'
|
||||||
import { JSX } from 'preact'
|
import { JSX } from 'preact'
|
||||||
import { Button } from '@homeman/components/Button.tsx'
|
import { Button } from '@homeman/components/Button.tsx'
|
||||||
import { Avatar } from '@homeman/components/Avatar.tsx'
|
import { Avatar } from '@homeman/components/Avatar.tsx'
|
||||||
|
import { ChevronDoubleDownOutline, ChevronDownOutline } from 'preact-heroicons'
|
||||||
|
import { ChevronDownMiniSolid } from 'preact-heroicons'
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
user: UserWithTodos
|
user: UserWithTodos
|
||||||
|
@ -90,14 +92,15 @@ export function TodoList(
|
||||||
</ul>
|
</ul>
|
||||||
{doneTodos.length > 0
|
{doneTodos.length > 0
|
||||||
? (
|
? (
|
||||||
<summary class='text-gray-500 mt-4'>
|
<details class='text-gray-500 [&_svg]:open:-rotate-180'>
|
||||||
+{doneTodos.length} completed todos
|
<summary class='cursor-pointer marker:content-[""] flex justify-between hover:bg-gray-500/20 p-4 rounded mt-4'>
|
||||||
<details class='cursor-pointer'>
|
<span>+{doneTodos.length} completed todos</span>
|
||||||
<ul class='flex flex-col gap-y-4 mt-4'>
|
<ChevronDownMiniSolid className='w-6 h-6' />
|
||||||
{doneTodos.map(todoItem)}
|
</summary>
|
||||||
</ul>
|
<ul class='flex flex-col gap-y-4 mt-2'>
|
||||||
</details>
|
{doneTodos.map(todoItem)}
|
||||||
</summary>
|
</ul>
|
||||||
|
</details>
|
||||||
)
|
)
|
||||||
: ''}
|
: ''}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue