From 3c9d80d75f8cd506c776b3d2f753d28d6f81d1cd Mon Sep 17 00:00:00 2001 From: Daniel Polito Date: Tue, 13 Jan 2026 12:41:35 -0300 Subject: feat(desktop): Adding Provider Icons (#8215) --- packages/ui/src/components/list.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'packages/ui/src/components/list.tsx') diff --git a/packages/ui/src/components/list.tsx b/packages/ui/src/components/list.tsx index 1283b3023..8c92728d7 100644 --- a/packages/ui/src/components/list.tsx +++ b/packages/ui/src/components/list.tsx @@ -10,9 +10,15 @@ export interface ListSearchProps { autofocus?: boolean } +export interface ListGroup { + category: string + items: T[] +} + export interface ListProps extends FilteredListProps { class?: string children: (item: T) => JSX.Element + groupHeader?: (group: ListGroup) => JSX.Element emptyMessage?: string onKeyEvent?: (event: KeyboardEvent, item: T | undefined) => void onMove?: (item: T | undefined) => void @@ -116,7 +122,7 @@ export function List(props: ListProps & { ref?: (ref: ListRef) => void }) setScrollRef, }) - function GroupHeader(props: { category: string }): JSX.Element { + function GroupHeader(groupProps: { category: string; children?: JSX.Element }): JSX.Element { const [stuck, setStuck] = createSignal(false) const [header, setHeader] = createSignal(undefined) @@ -138,7 +144,7 @@ export function List(props: ListProps & { ref?: (ref: ListRef) => void }) return (
- {props.category} + {groupProps.children ?? groupProps.category}
) } @@ -185,7 +191,7 @@ export function List(props: ListProps & { ref?: (ref: ListRef) => void }) {(group) => (
- + {props.groupHeader?.(group)}
-- cgit v1.2.3