From bef24b7cddead93ed38a71735f91d55cdba746c8 Mon Sep 17 00:00:00 2001 From: Steveplays Date: Fri, 12 Nov 2021 21:20:50 +0100 Subject: [PATCH] fix: added hover event to overline + removed context menu (#393) --- index.html | 2 +- src/components/navigation/right/Search.tsx | 2 +- src/components/ui/Overline.tsx | 13 +++++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 2361c152..26041f77 100644 --- a/index.html +++ b/index.html @@ -70,7 +70,7 @@ rel="apple-touch-startup-image" /> - +
diff --git a/src/components/navigation/right/Search.tsx b/src/components/navigation/right/Search.tsx index d6e2b2fc..e887a053 100644 --- a/src/components/navigation/right/Search.tsx +++ b/src/components/navigation/right/Search.tsx @@ -102,7 +102,7 @@ export function SearchSidebar({ close }: Props) { - + « back to members diff --git a/src/components/ui/Overline.tsx b/src/components/ui/Overline.tsx index 2b8b4896..4edcac23 100644 --- a/src/components/ui/Overline.tsx +++ b/src/components/ui/Overline.tsx @@ -5,6 +5,7 @@ import { Text } from "preact-i18n"; import { Children } from "../../types/Preact"; type Props = Omit, "children" | "as"> & { + hoverEnabled?: boolean; error?: string; block?: boolean; spaced?: boolean; @@ -15,6 +16,18 @@ type Props = Omit, "children" | "as"> & { const OverlineBase = styled.div>` display: inline; + transition: 0.2s ease filter; + + ${(props) => + props.hoverEnabled && + css` + &:hover { + filter: brightness(1.2); + cursor: pointer; + + transition: 0.2s ease filter; + } + `} ${(props) => !props.noMargin &&