forked from DustinBrett/daedalOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStyledSearch.ts
More file actions
60 lines (52 loc) · 1.27 KB
/
StyledSearch.ts
File metadata and controls
60 lines (52 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import styled from "styled-components";
const StyledSearch = styled.div`
border: 1px solid rgb(83, 83, 83);
display: flex;
height: ${({ theme }) => theme.sizes.fileExplorer.navInputHeight}px;
margin: 6px 12px 6px 0;
max-width: 148px;
overflow: hidden;
padding: 0;
position: relative;
width: 100%;
svg {
display: none;
}
input {
appearance: none;
background-color: rgb(25, 25, 25);
color: #fff;
font-family: ${({ theme }) => theme.formats.systemFont};
font-size: 12px;
font-weight: 400;
height: ${({ theme }) => theme.sizes.fileExplorer.navInputHeight - 2}px;
padding-bottom: 2px;
padding-left: 8px;
text-overflow: ellipsis;
white-space: nowrap;
width: 100%;
&::-webkit-search-cancel-button {
filter: invert(1);
padding-right: 4px;
}
&:not(:placeholder-shown) {
height: ${({ theme }) => theme.sizes.fileExplorer.navInputHeight}px;
}
&:focus::placeholder {
color: transparent;
}
}
input:placeholder-shown ~ svg {
display: block;
fill: rgb(113, 113, 113);
height: 12px;
pointer-events: none;
position: absolute;
right: 6px;
stroke: rgb(113, 113, 113);
stroke-width: 1;
top: 5px;
width: 12px;
}
`;
export default StyledSearch;