summaryrefslogtreecommitdiffstats
path: root/stepped-solutions/05/frontend/components/styles/CartStyles.js
diff options
context:
space:
mode:
authorWes Bos <wesbos@gmail.com>2018-06-19 12:49:31 -0400
committerWes Bos <wesbos@gmail.com>2018-06-19 12:49:31 -0400
commit8d4dffa6f01487be0cf5546653803d32282992eb (patch)
tree46b2ace612f1e364645ca7d4e1c46e80ec970891 /stepped-solutions/05/frontend/components/styles/CartStyles.js
parent14caed5d15b3601bb91a5f4a688fbdfba38cf321 (diff)
video 5
Diffstat (limited to 'stepped-solutions/05/frontend/components/styles/CartStyles.js')
-rw-r--r--stepped-solutions/05/frontend/components/styles/CartStyles.js47
1 files changed, 47 insertions, 0 deletions
diff --git a/stepped-solutions/05/frontend/components/styles/CartStyles.js b/stepped-solutions/05/frontend/components/styles/CartStyles.js
new file mode 100644
index 0000000..d5ee93a
--- /dev/null
+++ b/stepped-solutions/05/frontend/components/styles/CartStyles.js
@@ -0,0 +1,47 @@
+import styled from 'styled-components';
+
+const CartStyles = styled.div`
+ padding: 20px;
+ position: relative;
+ background: white;
+ position: fixed;
+ height: 100%;
+ top: 0;
+ right: 0;
+ width: 40%;
+ min-width: 500px;
+ bottom: 0;
+ transform: translateX(100%);
+ transition: all 0.3s;
+ box-shadow: 0 0 10px 3px rgba(0, 0, 0, 0.2);
+ z-index: 5;
+ display: grid;
+ grid-template-rows: auto 1fr auto;
+ ${props => props.open && `transform: translateX(0);`};
+ header {
+ border-bottom: 5px solid ${props => props.theme.black};
+ margin-bottom: 2rem;
+ padding-bottom: 2rem;
+ }
+ footer {
+ border-top: 10px double ${props => props.theme.black};
+ margin-top: 2rem;
+ padding-top: 2rem;
+ display: grid;
+ grid-template-columns: auto auto;
+ align-items: center;
+ font-size: 3rem;
+ font-weight: 900;
+ p {
+ margin: 0;
+ }
+ }
+ ul {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+ overflow: scroll;
+ }
+`;
+
+export default CartStyles;