blob: df86aeeaf7a8deb755e7425f7ee58bacf150c537 (
plain)
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
|
import styled, { keyframes } from 'styled-components';
const DropDown = styled.div`
position: absolute;
width: 100%;
z-index: 2;
border: 1px solid ${props => props.theme.lightgrey};
`;
const DropDownItem = styled.div`
border-bottom: 1px solid ${props => props.theme.lightgrey};
background: ${props => (props.highlighted ? '#f7f7f7' : 'white')};
padding: 1rem;
transition: all 0.2s;
${props => (props.highlighted ? 'padding-left: 2rem;' : null)};
display: flex;
align-items: center;
border-left: 10px solid ${props => (props.highlighted ? props.theme.lightgrey : 'white')};
img {
margin-right: 10px;
}
`;
const glow = keyframes`
from {
box-shadow: 0 0 0px yellow;
}
to {
box-shadow: 0 0 10px 1px yellow;
}
`;
const SearchStyles = styled.div`
position: relative;
input {
width: 100%;
padding: 10px;
border: 0;
font-size: 2rem;
&.loading {
animation: ${glow} 0.5s ease-in-out infinite alternate;
}
}
`;
export { DropDown, DropDownItem, SearchStyles };
|