Files
Homarr/src/components/layout/Logo.tsx

37 lines
834 B
TypeScript
Raw Normal View History

2022-05-15 12:42:53 +02:00
import { Group, Image, Text } from '@mantine/core';
2022-05-21 00:52:55 +02:00
import { NextLink } from '@mantine/next';
2022-04-25 00:11:32 +02:00
import * as React from 'react';
2022-06-07 00:07:56 +00:00
import { useConfig } from '../../tools/state';
2022-04-25 00:11:32 +02:00
export function Logo({ style }: any) {
2022-06-07 00:07:56 +00:00
const { config } = useConfig();
2022-05-12 14:24:15 +02:00
return (
<Group spacing="xs">
2022-05-15 12:42:53 +02:00
<Image
width={50}
src={config.settings.logo || '/imgs/logo.png'}
2022-05-15 12:42:53 +02:00
style={{
position: 'relative',
}}
/>
2022-05-21 00:52:55 +02:00
<NextLink
2022-06-01 19:53:57 +02:00
href="/"
2022-05-21 00:52:55 +02:00
style={{
textDecoration: 'none',
position: 'relative',
}}
>
2022-05-21 00:52:55 +02:00
<Text
sx={style}
weight="bold"
variant="gradient"
gradient={{ from: 'red', to: 'orange', deg: 145 }}
>
{config.settings.title || 'Homarr'}
2022-05-21 00:52:55 +02:00
</Text>
</NextLink>
</Group>
2022-05-12 14:24:15 +02:00
);
2022-04-25 00:11:32 +02:00
}