-
Notifications
You must be signed in to change notification settings - Fork 5
/
Modal.styled.js
68 lines (60 loc) · 1.3 KB
/
Modal.styled.js
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
61
62
63
64
65
66
67
68
import styled from "styled-components";
import { animated } from "react-spring";
import { space, flexbox } from "styled-system";
import { colors } from "@crave/farmblocks-theme";
import Card from "@crave/farmblocks-card";
export const Wrapper = styled(animated.div)`
top: 0;
right: 0;
bottom: 0;
left: 0;
display: flex;
flex-direction: column;
align-items: center;
overflow: hidden;
${space}
${flexbox}
`;
export const Overlay = styled.div`
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: ${colors.GREY_32};
`;
export const CardWrapper = styled(animated.div)`
max-width: 100%;
max-height: 100%;
`;
export const ConstrainedCard = styled(Card)`
max-height: 100%;
max-width: 100%;
min-width: 200px;
position: relative;
display: flex;
flex-direction: column;
border: none;
overflow: hidden;
${space}
`;
export const ContentWrapper = styled.div`
flex: 1;
overflow: auto;
-webkit-overflow-scrolling: touch;
padding: 16px;
`;
export const HeaderWrapper = styled.header`
overflow: auto;
padding-right: 16px;
`;
export const Section = styled.div`
display: flex;
padding: 16px;
${({ children, header }) =>
children &&
`border-${header ? "bottom" : "top"}: solid 1px ${colors.GREY_16}`};
.closeButton {
margin-left: auto;
}
`;