mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 15:35:55 +01:00
✨ Make logo text togglable on/off
This commit is contained in:
@@ -4,7 +4,7 @@ import * as React from 'react';
|
|||||||
import { useColorTheme } from '../../tools/color';
|
import { useColorTheme } from '../../tools/color';
|
||||||
import { useConfig } from '../../tools/state';
|
import { useConfig } from '../../tools/state';
|
||||||
|
|
||||||
export function Logo({ style }: any) {
|
export function Logo({ style, withoutText }: any) {
|
||||||
const { config } = useConfig();
|
const { config } = useConfig();
|
||||||
const { primaryColor, secondaryColor } = useColorTheme();
|
const { primaryColor, secondaryColor } = useColorTheme();
|
||||||
|
|
||||||
@@ -17,26 +17,28 @@ export function Logo({ style }: any) {
|
|||||||
position: 'relative',
|
position: 'relative',
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<NextLink
|
{withoutText ? null : (
|
||||||
href="/"
|
<NextLink
|
||||||
style={{
|
href="/"
|
||||||
textDecoration: 'none',
|
style={{
|
||||||
position: 'relative',
|
textDecoration: 'none',
|
||||||
}}
|
position: 'relative',
|
||||||
>
|
|
||||||
<Text
|
|
||||||
sx={style}
|
|
||||||
weight="bold"
|
|
||||||
variant="gradient"
|
|
||||||
gradient={{
|
|
||||||
from: primaryColor,
|
|
||||||
to: secondaryColor,
|
|
||||||
deg: 145,
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{config.settings.title || 'Homarr'}
|
<Text
|
||||||
</Text>
|
sx={style}
|
||||||
</NextLink>
|
weight="bold"
|
||||||
|
variant="gradient"
|
||||||
|
gradient={{
|
||||||
|
from: primaryColor,
|
||||||
|
to: secondaryColor,
|
||||||
|
deg: 145,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{config.settings.title || 'Homarr'}
|
||||||
|
</Text>
|
||||||
|
</NextLink>
|
||||||
|
)}
|
||||||
</Group>
|
</Group>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user