Prevent header play button from being squished

This commit is contained in:
jeffvli 2023-03-30 08:22:40 -07:00
parent 2b1c1d5e59
commit a17e0adf44
2 changed files with 10 additions and 8 deletions

View file

@ -1,5 +1,5 @@
import { NativeScrollArea } from '/@/renderer/components'; import { NativeScrollArea } from '/@/renderer/components';
import { AnimatedPage, LibraryHeaderBar, PlayButton } from '/@/renderer/features/shared'; import { AnimatedPage, LibraryHeaderBar } from '/@/renderer/features/shared';
import { useRef } from 'react'; import { useRef } from 'react';
import type { AgGridReact as AgGridReactType } from '@ag-grid-community/react/lib/agGridReact'; import type { AgGridReact as AgGridReactType } from '@ag-grid-community/react/lib/agGridReact';
import { useAlbumDetail } from '/@/renderer/features/albums/queries/album-detail-query'; import { useAlbumDetail } from '/@/renderer/features/albums/queries/album-detail-query';
@ -42,7 +42,7 @@ const AlbumDetailRoute = () => {
backgroundColor: background, backgroundColor: background,
children: ( children: (
<LibraryHeaderBar> <LibraryHeaderBar>
<PlayButton onClick={handlePlay} /> <LibraryHeaderBar.PlayButton onClick={handlePlay} />
<LibraryHeaderBar.Title>{detailQuery?.data?.name}</LibraryHeaderBar.Title> <LibraryHeaderBar.Title>{detailQuery?.data?.name}</LibraryHeaderBar.Title>
</LibraryHeaderBar> </LibraryHeaderBar>
), ),

View file

@ -1,5 +1,5 @@
import { ReactNode } from 'react'; import { ReactNode } from 'react';
import { Group } from '@mantine/core'; import { Group, Box } from '@mantine/core';
import { TextTitle } from '/@/renderer/components'; import { TextTitle } from '/@/renderer/components';
import { PlayButton as PlayBtn } from '/@/renderer/features/shared/components/play-button'; import { PlayButton as PlayBtn } from '/@/renderer/features/shared/components/play-button';
@ -44,11 +44,13 @@ interface PlayButtonProps {
const PlayButton = ({ onClick }: PlayButtonProps) => { const PlayButton = ({ onClick }: PlayButtonProps) => {
return ( return (
<PlayBtn <Box>
h="45px" <PlayBtn
w="45px" h="45px"
onClick={onClick} w="45px"
/> onClick={onClick}
/>
</Box>
); );
}; };