mirror of
https://github.com/antebudimir/feishin.git
synced 2025-12-31 18:13:31 +00:00
Add generic to CardRow type
squash cardrow type squash cardrow type
This commit is contained in:
parent
747633fb25
commit
6eb08243b7
4 changed files with 10 additions and 8 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import { Album, AlbumArtist, Artist } from '/@/renderer/api/types';
|
||||
import { AppRoute } from '/@/renderer/router/routes';
|
||||
|
||||
export type RouteSlug = {
|
||||
|
|
@ -12,9 +13,9 @@ export type CardRoute = {
|
|||
|
||||
export type TableType = 'nowPlaying' | 'sideQueue' | 'sideDrawerQueue' | 'songs';
|
||||
|
||||
export type CardRow = {
|
||||
export type CardRow<T> = {
|
||||
arrayProperty?: string;
|
||||
property: string;
|
||||
property: keyof T;
|
||||
route?: CardRoute;
|
||||
};
|
||||
|
||||
|
|
@ -161,7 +162,7 @@ export type PlayQueueAddOptions = {
|
|||
|
||||
export type GridCardData = {
|
||||
cardControls: any;
|
||||
cardRows: CardRow[];
|
||||
cardRows: CardRow<Album | AlbumArtist | Artist>[];
|
||||
columnCount: number;
|
||||
display: CardDisplayType;
|
||||
handlePlayQueueAdd: (options: PlayQueueAddOptions) => void;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue