mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-09 23:15:46 +01:00
45 lines
1.1 KiB
TypeScript
45 lines
1.1 KiB
TypeScript
import { Group, Image, Text } from '@mantine/core';
|
|
import { NextLink } from '@mantine/next';
|
|
import * as React from 'react';
|
|
import { useColorTheme } from '../../tools/color';
|
|
import { useConfig } from '../../tools/state';
|
|
|
|
export function Logo({ style, withoutText }: any) {
|
|
const { config } = useConfig();
|
|
const { primaryColor, secondaryColor } = useColorTheme();
|
|
|
|
return (
|
|
<Group spacing="xs">
|
|
<Image
|
|
width={50}
|
|
src={config.settings.logo || '/imgs/logo/logo.png'}
|
|
style={{
|
|
position: 'relative',
|
|
}}
|
|
/>
|
|
{withoutText ? null : (
|
|
<NextLink
|
|
href="/"
|
|
style={{
|
|
textDecoration: 'none',
|
|
position: 'relative',
|
|
}}
|
|
>
|
|
<Text
|
|
sx={style}
|
|
weight="bold"
|
|
variant="gradient"
|
|
gradient={{
|
|
from: primaryColor,
|
|
to: secondaryColor,
|
|
deg: 145,
|
|
}}
|
|
>
|
|
{config.settings.title || 'Homarr'}
|
|
</Text>
|
|
</NextLink>
|
|
)}
|
|
</Group>
|
|
);
|
|
}
|