feishin/src/renderer/features/now-playing/components/sidebar-play-queue.tsx

36 lines
942 B
TypeScript
Raw Normal View History

2022-12-19 15:59:14 -08:00
import { useRef } from 'react';
import type { AgGridReact as AgGridReactType } from '@ag-grid-community/react/lib/agGridReact';
2022-12-28 01:29:37 -08:00
import { Box, Stack } from '@mantine/core';
2022-12-19 15:59:14 -08:00
import { PlayQueue } from '/@/renderer/features/now-playing/components/play-queue';
import { PlayQueueListControls } from './play-queue-list-controls';
import { Song } from '/@/renderer/api/types';
export const SidebarPlayQueue = () => {
const queueRef = useRef<{ grid: AgGridReactType<Song> } | null>(null);
return (
<Stack
2022-12-28 01:29:37 -08:00
h="100%"
spacing={0}
sx={{ borderLeft: '2px solid var(--generic-border-color)' }}
2022-12-19 15:59:14 -08:00
>
2022-12-28 01:29:37 -08:00
<Box
h="50px"
mr="160px"
sx={{
'-webkit-app-region': 'drag',
zIndex: -1,
}}
/>
2022-12-19 15:59:14 -08:00
<PlayQueue
ref={queueRef}
type="sideQueue"
/>
<PlayQueueListControls
tableRef={queueRef}
type="sideQueue"
/>
</Stack>
);
};