26 lines
698 B
TypeScript
26 lines
698 B
TypeScript
import { Title, AppShell, Flex } from "@mantine/core";
|
|
import { HeaderConfig } from "../types/header-config";
|
|
import BackButton from "./back-button";
|
|
|
|
const Header = ({ collapsed, title, withBackButton }: HeaderConfig) => {
|
|
return (
|
|
<AppShell.Header
|
|
id='app-header'
|
|
display={collapsed ? 'none' : 'flex'}
|
|
style={{
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
}}
|
|
>
|
|
{ withBackButton && <BackButton /> }
|
|
<Flex justify='center' px='md' mt={8}>
|
|
<Title order={1} lts='0.08em' style={{ userSelect: 'none' }}>
|
|
{title?.toLocaleUpperCase()}
|
|
</Title>
|
|
</Flex>
|
|
</AppShell.Header>
|
|
);
|
|
}
|
|
|
|
export default Header;
|