forked from emmabostian/fem-design-systems
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Emma Wedekind
committed
Feb 12, 2020
1 parent
b4691b1
commit bdccd0b
Showing
14 changed files
with
368 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from "react"; | ||
import styled from "styled-components"; | ||
|
||
const CloseIconWrapper = styled.svg` | ||
position: absolute; | ||
top: 40px; | ||
right: 40px; | ||
width: 24px; | ||
height: 24px; | ||
`; | ||
|
||
export const CloseIcon = () => ( | ||
<CloseIconWrapper> | ||
<path | ||
d="M14.0069 11.9675L23.6255 2.35078C23.872 2.08632 24.0062 1.73654 23.9998 1.37512C23.9934 1.0137 23.847 0.668862 23.5913 0.413259C23.3357 0.157657 22.9908 0.0112437 22.6293 0.00486683C22.2678 -0.00151001 21.9179 0.132647 21.6534 0.379074L12.0348 9.99581L2.4162 0.374423C2.15169 0.127997 1.80184 -0.00615949 1.44035 0.000217348C1.07886 0.00659419 0.733953 0.153006 0.478301 0.408609C0.222649 0.664211 0.0762072 1.00905 0.0698292 1.37047C0.0634511 1.73189 0.197634 2.08167 0.444109 2.34613L10.0627 11.9675L0.444109 21.5843C0.307017 21.712 0.197059 21.866 0.120795 22.0371C0.0445312 22.2083 0.0035228 22.393 0.000217153 22.5803C-0.00308849 22.7676 0.0313764 22.9537 0.101555 23.1274C0.171734 23.3011 0.276189 23.4589 0.408689 23.5914C0.541189 23.7239 0.699019 23.8283 0.872764 23.8985C1.04651 23.9686 1.23261 24.0031 1.41996 23.9998C1.60732 23.9965 1.79209 23.9555 1.96325 23.8792C2.13441 23.803 2.28846 23.693 2.4162 23.556L12.0348 13.9392L21.6534 23.556C21.9179 23.8024 22.2678 23.9366 22.6293 23.9302C22.9908 23.9238 23.3357 23.7774 23.5913 23.5218C23.847 23.2662 23.9934 22.9214 23.9998 22.5599C24.0062 22.1985 23.872 21.8487 23.6255 21.5843L14.0069 11.9675Z" | ||
fill="#737581" | ||
/> | ||
</CloseIconWrapper> | ||
); |
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * from "./icons/Save"; | ||
export * from "./icons/CloseIcon"; | ||
export * from "./illustrations/SignUp"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import React from "react"; | ||
import styled from "styled-components"; | ||
import { paragraph, header3 } from "../utils"; | ||
import { PrimaryButton } from "./Buttons"; | ||
import { SignUp, CloseIcon } from "../assets"; | ||
import { useSpring, animated, config } from "react-spring"; | ||
|
||
const CloseModalButton = styled.button` | ||
cursor: pointer; | ||
background: none; | ||
border: none; | ||
`; | ||
|
||
const ModalWrapper = styled.div` | ||
width: 800px; | ||
height: 500px; | ||
box-shadow: 0 5px 16px rgba(0, 0, 0, 0.2); | ||
background-color: ${props => props.theme.formElementBackground}; | ||
color: ${props => props.theme.textColor}; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
position: relative; | ||
border-radius: 2px; | ||
`; | ||
|
||
const SignUpHeader = styled.h3` | ||
${header3} | ||
`; | ||
|
||
const SignUpText = styled.p` | ||
${paragraph} | ||
max-width: 70%; | ||
text-align: center; | ||
`; | ||
|
||
export const SignUpModal = ({ showModal, setShowModal }) => { | ||
const animation = useSpring({ | ||
opacity: showModal ? 1 : 0, | ||
transform: showModal ? `translateY(0)` : `translateY(-100%)`, | ||
config: config.slow | ||
}); | ||
return ( | ||
<animated.div style={animation}> | ||
<ModalWrapper> | ||
<SignUp /> | ||
<SignUpHeader>Sign Up</SignUpHeader> | ||
<SignUpText> | ||
Sign up today to get access to all of our content and features! | ||
</SignUpText> | ||
<PrimaryButton onClick={() => console.log("You signed up!")}> | ||
Sign Up | ||
</PrimaryButton> | ||
<CloseModalButton onClick={() => setShowModal(false)}> | ||
<CloseIcon /> | ||
</CloseModalButton> | ||
</ModalWrapper> | ||
</animated.div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from "./Buttons"; | ||
export * from "./Modals"; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,41 @@ | ||
export const primaryFont = '"Roboto Mono", monospace'; | ||
|
||
export const typeScale = { | ||
header1: "1.8rem", | ||
header2: "1.6rem", | ||
header3: "1.4rem", | ||
header4: "1.2rem", | ||
header5: "1.1rem", | ||
paragraph: "1rem", | ||
helperText: ".8rem", | ||
copyrightText: ".7rem" | ||
export const header1 = { | ||
fontSize: "1.8rem", | ||
fontFamily: primaryFont | ||
}; | ||
|
||
export const header2 = { | ||
fontSize: "1.6rem", | ||
fontFamily: primaryFont | ||
}; | ||
|
||
export const header3 = { | ||
fontSize: "1.4rem", | ||
fontFamily: primaryFont | ||
}; | ||
|
||
export const header4 = { | ||
fontSize: "1.2rem", | ||
fontFamily: primaryFont | ||
}; | ||
|
||
export const header5 = { | ||
fontSize: "1.1rem", | ||
fontFamily: primaryFont | ||
}; | ||
|
||
export const paragraph = { | ||
fontSize: "1rem", | ||
fontFamily: primaryFont | ||
}; | ||
|
||
export const helperText = { | ||
fontSize: "0.8rem", | ||
fontFamily: primaryFont | ||
}; | ||
|
||
export const copyrightText = { | ||
fontSize: "0.7rem", | ||
fontFamily: primaryFont | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1522,7 +1522,7 @@ | |
core-js-pure "^3.0.0" | ||
regenerator-runtime "^0.13.2" | ||
|
||
"@babel/[email protected]", "@babel/runtime@^7.5.1", "@babel/runtime@^7.6.2", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6": | ||
"@babel/[email protected]", "@babel/runtime@^7.3.1", "@babel/runtime@^7.5.1", "@babel/runtime@^7.6.2", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6": | ||
version "7.8.4" | ||
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.8.4.tgz#d79f5a2040f7caa24d53e563aad49cbc05581308" | ||
integrity sha512-neAp3zt80trRVBI1x0azq6c57aNBqYZH8KhMm3TaB7wEI5Q4A2SHfBHE8w9gOhI/lrqxtEbXZgQIrHP+wvSGwQ== | ||
|
@@ -9148,7 +9148,7 @@ prompts@^2.0.1: | |
kleur "^3.0.3" | ||
sisteransi "^1.0.3" | ||
|
||
prop-types@^15.6.2, prop-types@^15.7.2: | ||
prop-types@^15.5.8, prop-types@^15.6.2, prop-types@^15.7.2: | ||
version "15.7.2" | ||
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" | ||
integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== | ||
|
@@ -9434,6 +9434,14 @@ [email protected]: | |
optionalDependencies: | ||
fsevents "2.1.2" | ||
|
||
react-spring@^8.0.27: | ||
version "8.0.27" | ||
resolved "https://registry.yarnpkg.com/react-spring/-/react-spring-8.0.27.tgz#97d4dee677f41e0b2adcb696f3839680a3aa356a" | ||
integrity sha512-nDpWBe3ZVezukNRandTeLSPcwwTMjNVu1IDq9qA/AMiUqHuRN4BeSWvKr3eIxxg1vtiYiOLy4FqdfCP5IoP77g== | ||
dependencies: | ||
"@babel/runtime" "^7.3.1" | ||
prop-types "^15.5.8" | ||
|
||
react@^16.12.0: | ||
version "16.12.0" | ||
resolved "https://registry.yarnpkg.com/react/-/react-16.12.0.tgz#0c0a9c6a142429e3614834d5a778e18aa78a0b83" | ||
|