diff --git a/README.md b/README.md
index 50e5933d0..ad08601d3 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,15 @@
# Survey form with React
-Replace this readme with your own information about your project.
+This weeks project was based around using React to a greater potential by introducing the use of State. The task was to create a Typeform-like survey to collect data from your users.int.
-Start by briefly describing the assignment in a sentence or two. Keep it short and to the point.
+## βοΈ The problem
-## The problem
+Due to all of us (students) feeling a bit exhausted from our pace at week 6, I came up with the idea to use this project in a humorous way for a calming and stress reducing experience.
-Describe how you approached to problem, and what tools and techniques you used to solve it. How did you plan? What technologies did you use? If you had more time, what would be next?
+I wanted to practice different forms of inputs and how to style them differently and connecting them to the React hook useState. I included text input, a range slider, radio buttons and a drop down menu. As an ending I created a css built breathing exercise with a setting and different colors depening on the users answers.
+
+If I had more time I would've tried to make all the styling work for Safari-users(it is best viewed in Chrome as of now).
## View it live
-Every project should be deployed somewhere. Be sure to include the link to the deployed project so that the viewer can click around and see what it's all about.
+https://stress-less-survey.netlify.app
diff --git a/code/package-lock.json b/code/package-lock.json
index e34d9bb1c..3a317936e 100644
--- a/code/package-lock.json
+++ b/code/package-lock.json
@@ -9,7 +9,6 @@
"version": "1.0.0",
"dependencies": {
"@babel/eslint-parser": "^7.18.9",
- "babel-eslint": "^10.1.0",
"eslint": "^8.21.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-plugin-import": "^2.26.0",
@@ -4637,34 +4636,6 @@
"resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz",
"integrity": "sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA=="
},
- "node_modules/babel-eslint": {
- "version": "10.1.0",
- "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz",
- "integrity": "sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==",
- "deprecated": "babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.",
- "dependencies": {
- "@babel/code-frame": "^7.0.0",
- "@babel/parser": "^7.7.0",
- "@babel/traverse": "^7.7.0",
- "@babel/types": "^7.7.0",
- "eslint-visitor-keys": "^1.0.0",
- "resolve": "^1.12.0"
- },
- "engines": {
- "node": ">=6"
- },
- "peerDependencies": {
- "eslint": ">= 4.12.1"
- }
- },
- "node_modules/babel-eslint/node_modules/eslint-visitor-keys": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz",
- "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==",
- "engines": {
- "node": ">=4"
- }
- },
"node_modules/babel-jest": {
"version": "27.5.1",
"resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.5.1.tgz",
@@ -20687,26 +20658,6 @@
"resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz",
"integrity": "sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA=="
},
- "babel-eslint": {
- "version": "10.1.0",
- "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz",
- "integrity": "sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==",
- "requires": {
- "@babel/code-frame": "^7.0.0",
- "@babel/parser": "^7.7.0",
- "@babel/traverse": "^7.7.0",
- "@babel/types": "^7.7.0",
- "eslint-visitor-keys": "^1.0.0",
- "resolve": "^1.12.0"
- },
- "dependencies": {
- "eslint-visitor-keys": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz",
- "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ=="
- }
- }
- },
"babel-jest": {
"version": "27.5.1",
"resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.5.1.tgz",
diff --git a/code/public/index.html b/code/public/index.html
index e6730aa66..53f7da907 100644
--- a/code/public/index.html
+++ b/code/public/index.html
@@ -13,7 +13,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
-
Ok, what activity sparks your joy and makes your ears wiggle?
+
+
+
+
+
+ >
+ );
+}
\ No newline at end of file
diff --git a/code/src/components/Breathe.js b/code/src/components/Breathe.js
new file mode 100644
index 000000000..50c585656
--- /dev/null
+++ b/code/src/components/Breathe.js
@@ -0,0 +1,38 @@
+import React from 'react';
+
+export const Breathe = ({ name, activity, colour, place, temp, who }) => {
+ return (
+
+
+
Keep your happy scenario in your mind and let's slow down...
+
+ Remember, you are by the {place} and you're going to start {activity} soon.
+ It's around {temp} degrees, {who} is next to you and already looking at
+ the {colour} light. Let's do this, focus {name}!
+
+ One breath is illustated by the dot.
+ Each step is one side of the square.
+ Start by breathing out slowly, releasing the air from your lungs.
+ 1. Breathe in through your nose
+ 2. Hold your breath
+ 3. Exhale slowly
+ 4. Hold your breath again
+ Repeat as many times as you need.
+
+
+ );
+}
\ No newline at end of file
diff --git a/code/src/components/Colour.js b/code/src/components/Colour.js
new file mode 100644
index 000000000..9232933eb
--- /dev/null
+++ b/code/src/components/Colour.js
@@ -0,0 +1,24 @@
+import React from 'react';
+
+export const Colour = ({ colour, setColour, step }) => {
+ return (
+
+
Current step: {step} / 7
+
What's your favourite color?
+
+
+ )
+}
\ No newline at end of file
diff --git a/code/src/components/Name.js b/code/src/components/Name.js
new file mode 100644
index 000000000..a16db0c2d
--- /dev/null
+++ b/code/src/components/Name.js
@@ -0,0 +1,22 @@
+import React from 'react';
+
+export const Name = ({ name, setName, step }) => {
+ const handleNameChange = (event) => {
+ setName(event.target.value);
+ }
+ return (
+
+
Current step: {step} / 7
+
Let's start of by introducing ourselves!
+ What's your name?
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/code/src/components/Place.js b/code/src/components/Place.js
new file mode 100644
index 000000000..736c8b40f
--- /dev/null
+++ b/code/src/components/Place.js
@@ -0,0 +1,49 @@
+import React from 'react';
+import ocean from '../img/ocean.png';
+import forest from '../img/forest.png';
+import home from '../img/home.png';
+
+export const Place = ({ place, setPlace, step }) => {
+ const handlePlaceChange = (event) => {
+ setPlace(event.target.value);
+ }
+ return (
+
+
+
Current step: {step} / 7
+
+
Where do you feel the most at ease?
+
+
+
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/code/src/components/Start.js b/code/src/components/Start.js
new file mode 100644
index 000000000..d14c68335
--- /dev/null
+++ b/code/src/components/Start.js
@@ -0,0 +1,21 @@
+import React from 'react';
+
+export const Start = (begin) => {
+ const handleClick = () => {
+ begin.onButtonClick();
+ }
+ return (
+
+
+
Hello!
+
+
+
Have you been feeling a little bit stressed lately?
+ I would like to help you feel better,
+ let's take our first steps together...
+
+ {name}, picture yourself by the {place} where you are about to start your {activity}.
+ You feel the atmosphere beeing just the way you want, it is around {temp} degrees.
+ By your side you have {who} looking at you with a smile.
+ In the distance you see a beautiful {colour} light.
+
+
+ {who} want you to move on now.
+ Are you ready to take the next step {name}?
+
+
+ )
+}
\ No newline at end of file
diff --git a/code/src/components/Temp.js b/code/src/components/Temp.js
new file mode 100644
index 000000000..2ae6749b2
--- /dev/null
+++ b/code/src/components/Temp.js
@@ -0,0 +1,48 @@
+import React from 'react';
+
+export const Temp = ({ temp, setTemp, step }) => {
+ let tempText = '';
+ switch (temp) {
+ case '0':
+ tempText = 'Freezing π₯Ά';
+ break;
+ case '10':
+ tempText = 'Chilly π¨';
+ break;
+ case '20':
+ tempText = 'Neutral π';
+ break;
+ case '30':
+ tempText = 'Warm βοΈ';
+ break;
+ case '40':
+ tempText = 'Hot π₯΅';
+ break;
+ case '50':
+ tempText = 'Extremely Hot π₯';
+ break;
+ default:
+ tempText = 'Drag the slider to desired temp';
+ }
+ return (
+
+ );
+};
\ No newline at end of file
diff --git a/code/src/components/Who.js b/code/src/components/Who.js
new file mode 100644
index 000000000..a30de8cb8
--- /dev/null
+++ b/code/src/components/Who.js
@@ -0,0 +1,20 @@
+import React from 'react';
+
+export const Who = ({ who, setWho, step }) => {
+ const handleWhoChange = (event) => {
+ setWho(event.target.value);
+ }
+ return (
+
+
Current step: {step} / 7
+
We are almost there. Who would you like to have next to you?