This repository has been archived on 2025-03-19. You can view files and clone it, but cannot push or open issues or pull requests.
feishin/src/renderer/features/shared/components/library-header-bar.tsx
Jeff 44a4b88809
Migrate to mantine v6 (#15)
* Add letter spacing to cell text

* Set window control height in px

* Add temp unused routes

* Migrate text title font weights

* Bump mantine to v6 alpha

* Migrate modals / notifications

* Increase header bar to 65px

* Adjust play button props

* Migrate various components

* Migrate various pages and root styles

* Adjust default badge padding

* Fix sidebar spacing

* Fix list header badges

* Adjust default theme
2023-01-28 20:46:07 -08:00

55 lines
1,011 B
TypeScript

import { ReactNode } from 'react';
import { Group } from '@mantine/core';
import { TextTitle } from '/@/renderer/components';
import { PlayButton as PlayBtn } from '/@/renderer/features/shared/components/play-button';
interface LibraryHeaderBarProps {
children: ReactNode;
}
export const LibraryHeaderBar = ({ children }: LibraryHeaderBarProps) => {
return (
<Group
noWrap
align="center"
h="100%"
px="1rem"
spacing="md"
>
{children}
</Group>
);
};
interface TitleProps {
children: ReactNode;
}
const Title = ({ children }: TitleProps) => {
return (
<TextTitle
order={2}
overflow="hidden"
weight={700}
>
{children}
</TextTitle>
);
};
interface PlayButtonProps {
onClick: () => void;
}
const PlayButton = ({ onClick }: PlayButtonProps) => {
return (
<PlayBtn
h="50px"
w="50px"
onClick={onClick}
/>
);
};
LibraryHeaderBar.Title = Title;
LibraryHeaderBar.PlayButton = PlayButton;