35 | Saved Searches
36 | {queries.length === 0 ? (
37 |
38 | There are no saved queries.
39 |
Search for something and press Cmd+Enter to save the
40 | search.
41 |
42 | ) : null}
43 |
44 | {queries.map((query: string, index: number) => (
45 | -
46 |
49 |
50 | ))}
51 |
52 |
53 | );
54 | };
55 |
--------------------------------------------------------------------------------
/packages/app-desktop/src/client/components/Search.tsx:
--------------------------------------------------------------------------------
1 | import styled from "styled-components";
2 | import * as React from "react";
3 | import { useSelector, useDispatch } from "react-redux";
4 |
5 | import { textColorForBackground, shadeColor } from "../utils/color";
6 | import { getMode, getWritingFocusMode } from "../selectors";
7 | import { modeClose, modeHandleKey } from "../mode";
8 |
9 | const Root = styled.div<{ active: boolean }>`
10 | display: flex;
11 | align-items: center;
12 | justify-content: center;
13 | max-width: calc(1400px - 2rem);
14 | margin: 0 5rem;
15 | width: 100%;
16 |
17 | svg {
18 | pointer-events: none;
19 |
20 | path {
21 | fill: ${({ theme, active }) =>
22 | active
23 | ? textColorForBackground(theme.background1)
24 | : shadeColor(textColorForBackground(theme.background1), 50)};
25 | }
26 | }
27 | `;
28 |
29 | const Icon = () => {
30 | return (
31 |