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

38 lines
1,014 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';
import { Box, Flex } from '@mantine/core';
2022-12-19 15:59:14 -08:00
import { PlayQueueListControls } from './play-queue-list-controls';
import { Song } from '/@/renderer/api/types';
import { PlayQueue } from '/@/renderer/features/now-playing/components/play-queue';
export const DrawerPlayQueue = () => {
const queueRef = useRef<{ grid: AgGridReactType<Song> } | null>(null);
return (
<Flex
direction="column"
2023-01-30 20:16:43 -08:00
h="100%"
sx={{
borderTopLeftRadius: '5px',
borderTopRightRadius: '5px',
}}
2022-12-19 15:59:14 -08:00
>
<Box
bg="var(--main-bg)"
sx={{ borderTopLeftRadius: '5px', borderTopRightRadius: '5px' }}
>
<PlayQueueListControls
tableRef={queueRef}
type="sideQueue"
/>
</Box>
<Flex h="100%">
<PlayQueue
ref={queueRef}
type="sideQueue"
/>
</Flex>
</Flex>
2022-12-19 15:59:14 -08:00
);
};