add expanded list item component

This commit is contained in:
jeffvli
2025-09-28 19:16:55 -07:00
parent e4574b0260
commit 5ff9efb7d6
4 changed files with 219 additions and 41 deletions
@@ -1,7 +1,7 @@
.container {
width: 100%;
height: 100%;
padding: var(--theme-spacing-lg);
padding: var(--theme-spacing-sm);
}
.inner {
@@ -1,3 +1,5 @@
import { Suspense } from 'react';
import styles from './expanded-list-item.module.css';
import {
@@ -5,6 +7,7 @@ import {
ItemListStateActions,
} from '/@/renderer/components/item-list/helpers/item-list-state';
import { ExpandedAlbumListItem } from '/@/renderer/features/albums/components/expanded-album-list-item';
import { Spinner } from '/@/shared/components/spinner/spinner';
import { LibraryItem } from '/@/shared/types/domain-types';
interface ExpandedListItemProps {
@@ -23,7 +26,9 @@ export const ExpandedListItem = ({ internalState, itemType }: ExpandedListItemPr
return (
<div className={styles.container}>
<div className={styles.inner}>
<SelectedItem item={currentItem} itemType={itemType} />
<Suspense fallback={<Spinner container />}>
<SelectedItem item={currentItem} itemType={itemType} />
</Suspense>
</div>
</div>
);