mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-21 14:40:58 -05:00
fix: added hover event to overline + removed context menu (#393)
This commit is contained in:
parent
594693f8d7
commit
bef24b7cdd
3 changed files with 15 additions and 2 deletions
|
@ -70,7 +70,7 @@
|
||||||
rel="apple-touch-startup-image"
|
rel="apple-touch-startup-image"
|
||||||
/>
|
/>
|
||||||
</head>
|
</head>
|
||||||
<body ontouchstart="">
|
<body onContextMenu="return false" ontouchstart="">
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<script type="module" src="/src/main.tsx"></script>
|
<script type="module" src="/src/main.tsx"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -102,7 +102,7 @@ export function SearchSidebar({ close }: Props) {
|
||||||
<GenericSidebarBase>
|
<GenericSidebarBase>
|
||||||
<GenericSidebarList>
|
<GenericSidebarList>
|
||||||
<SearchBase>
|
<SearchBase>
|
||||||
<Overline type="error" onClick={close} block>
|
<Overline type="error" onClick={close} block hoverEnabled>
|
||||||
« back to members
|
« back to members
|
||||||
</Overline>
|
</Overline>
|
||||||
<Overline type="subtle" block>
|
<Overline type="subtle" block>
|
||||||
|
|
|
@ -5,6 +5,7 @@ import { Text } from "preact-i18n";
|
||||||
import { Children } from "../../types/Preact";
|
import { Children } from "../../types/Preact";
|
||||||
|
|
||||||
type Props = Omit<JSX.HTMLAttributes<HTMLDivElement>, "children" | "as"> & {
|
type Props = Omit<JSX.HTMLAttributes<HTMLDivElement>, "children" | "as"> & {
|
||||||
|
hoverEnabled?: boolean;
|
||||||
error?: string;
|
error?: string;
|
||||||
block?: boolean;
|
block?: boolean;
|
||||||
spaced?: boolean;
|
spaced?: boolean;
|
||||||
|
@ -15,6 +16,18 @@ type Props = Omit<JSX.HTMLAttributes<HTMLDivElement>, "children" | "as"> & {
|
||||||
|
|
||||||
const OverlineBase = styled.div<Omit<Props, "children" | "error">>`
|
const OverlineBase = styled.div<Omit<Props, "children" | "error">>`
|
||||||
display: inline;
|
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) =>
|
||||||
!props.noMargin &&
|
!props.noMargin &&
|
||||||
|
|
Loading…
Reference in a new issue