mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-04 23:40:48 +00:00
wip(desktop): progress
This commit is contained in:
parent
cbb591eb7d
commit
85cfa226c3
6 changed files with 222 additions and 70 deletions
|
|
@ -4,6 +4,7 @@ import { FilteredListProps, useFilteredList } from "@opencode-ai/ui/hooks"
|
|||
import { Icon, IconProps } from "./icon"
|
||||
|
||||
export interface ListProps<T> extends FilteredListProps<T> {
|
||||
class?: string
|
||||
children: (item: T) => JSX.Element
|
||||
emptyMessage?: string
|
||||
onKeyEvent?: (event: KeyboardEvent, item: T | undefined) => void
|
||||
|
|
@ -90,7 +91,7 @@ export function List<T>(props: ListProps<T> & { ref?: (ref: ListRef) => void })
|
|||
})
|
||||
|
||||
return (
|
||||
<div ref={setScrollRef} data-component="list">
|
||||
<div ref={setScrollRef} data-component="list" classList={{ [props.class ?? ""]: !!props.class }}>
|
||||
<Show
|
||||
when={flat().length > 0}
|
||||
fallback={
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue