From 6d06b9809d466a49519afc99bcef14115eede1d4 Mon Sep 17 00:00:00 2001 From: thatmattlove Date: Sun, 16 Jun 2024 16:59:22 -0400 Subject: [PATCH] (possibly) fix log width issue --- hyperglass/models/config/web.py | 4 +--- hyperglass/ui/components/header/logo.tsx | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hyperglass/models/config/web.py b/hyperglass/models/config/web.py index 72a528e..7916d9e 100644 --- a/hyperglass/models/config/web.py +++ b/hyperglass/models/config/web.py @@ -86,10 +86,8 @@ class Logo(HyperglassModel): light: FilePath = DEFAULT_IMAGES / "hyperglass-light.svg" dark: FilePath = DEFAULT_IMAGES / "hyperglass-dark.svg" favicon: FilePath = DEFAULT_IMAGES / "hyperglass-icon.svg" - width: str = Field(default="100%", pattern=PERCENTAGE_PATTERN) - # width: t.Optional[t.Union[int, Percentage]] = "100%" + width: str = Field(default="50%", pattern=PERCENTAGE_PATTERN) height: t.Optional[str] = Field(default=None, pattern=PERCENTAGE_PATTERN) - # height: t.Optional[t.Union[int, Percentage]] = None class LogoPublic(Logo): diff --git a/hyperglass/ui/components/header/logo.tsx b/hyperglass/ui/components/header/logo.tsx index c67ddbd..a5aa6ec 100644 --- a/hyperglass/ui/components/header/logo.tsx +++ b/hyperglass/ui/components/header/logo.tsx @@ -41,7 +41,8 @@ export const Logo = (props: ImageProps): JSX.Element => { src={source} alt={web.text.title} onError={setFallback} - width={width ?? 'auto'} + maxW={{ base: '100%', md: width }} + width="auto" css={{ userDrag: 'none', userSelect: 'none',