mirror of
https://github.com/revoltchat/revite.git
synced 2024-12-24 22:52:09 -05:00
parent
94fb1c6d71
commit
374f5d1747
2 changed files with 17 additions and 9 deletions
|
@ -102,8 +102,8 @@ export function SearchSidebar({ close }: Props) {
|
||||||
<GenericSidebarBase>
|
<GenericSidebarBase>
|
||||||
<GenericSidebarList>
|
<GenericSidebarList>
|
||||||
<SearchBase>
|
<SearchBase>
|
||||||
<Overline type="error" onClick={close} block hoverEnabled>
|
<Overline type="accent" block hover>
|
||||||
« back to members
|
<a onClick={close}>« back to members</a>
|
||||||
</Overline>
|
</Overline>
|
||||||
<Overline type="subtle" block>
|
<Overline type="subtle" block>
|
||||||
<Text id="app.main.channel.search.title" />
|
<Text id="app.main.channel.search.title" />
|
||||||
|
@ -118,7 +118,7 @@ export function SearchSidebar({ close }: Props) {
|
||||||
<Button
|
<Button
|
||||||
key={key}
|
key={key}
|
||||||
compact
|
compact
|
||||||
error={sort === key}
|
accent={sort === key}
|
||||||
onClick={() => setSort(key as Sort)}>
|
onClick={() => setSort(key as Sort)}>
|
||||||
<Text
|
<Text
|
||||||
id={`app.main.channel.search.sort.${key.toLowerCase()}`}
|
id={`app.main.channel.search.sort.${key.toLowerCase()}`}
|
||||||
|
|
|
@ -5,13 +5,13 @@ 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;
|
||||||
|
hover?: boolean;
|
||||||
block?: boolean;
|
block?: boolean;
|
||||||
spaced?: boolean;
|
spaced?: boolean;
|
||||||
noMargin?: boolean;
|
noMargin?: boolean;
|
||||||
children?: Children;
|
children?: Children;
|
||||||
type?: "default" | "subtle" | "error";
|
type?: "default" | "subtle" | "error" | "accent";
|
||||||
};
|
};
|
||||||
|
|
||||||
const OverlineBase = styled.div<Omit<Props, "children" | "error">>`
|
const OverlineBase = styled.div<Omit<Props, "children" | "error">>`
|
||||||
|
@ -19,13 +19,13 @@ const OverlineBase = styled.div<Omit<Props, "children" | "error">>`
|
||||||
transition: 0.2s ease filter;
|
transition: 0.2s ease filter;
|
||||||
|
|
||||||
${(props) =>
|
${(props) =>
|
||||||
props.hoverEnabled &&
|
props.hover &&
|
||||||
css`
|
css`
|
||||||
|
cursor: pointer;
|
||||||
|
transition: 0.2s ease filter;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
filter: brightness(1.2);
|
filter: brightness(1.2);
|
||||||
cursor: pointer;
|
|
||||||
|
|
||||||
transition: 0.2s ease filter;
|
|
||||||
}
|
}
|
||||||
`}
|
`}
|
||||||
|
|
||||||
|
@ -61,6 +61,14 @@ const OverlineBase = styled.div<Omit<Props, "children" | "error">>`
|
||||||
color: var(--error);
|
color: var(--error);
|
||||||
`}
|
`}
|
||||||
|
|
||||||
|
${(props) =>
|
||||||
|
props.type === "accent" &&
|
||||||
|
css`
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: var(--accent);
|
||||||
|
`}
|
||||||
|
|
||||||
${(props) =>
|
${(props) =>
|
||||||
props.block &&
|
props.block &&
|
||||||
css`
|
css`
|
||||||
|
|
Loading…
Reference in a new issue