summaryrefslogtreecommitdiff
path: root/client/src/components/Input
diff options
context:
space:
mode:
authorrohan09-raj <[email protected]>2022-07-28 17:56:15 +0530
committerrohan09-raj <[email protected]>2022-07-28 17:56:15 +0530
commit49be4dfc3d478ad02876c9238c48c513edac1e7c (patch)
treeb79c0bd1c2cb1582df0d03e88e4d03d097e9f0a0 /client/src/components/Input
parentffefbc1c2a382597c6d9f90977f8c907e26fbe2e (diff)
refactoring folder structure
Diffstat (limited to 'client/src/components/Input')
-rw-r--r--client/src/components/Input/Input.jsx22
-rw-r--r--client/src/components/Input/Input.module.css19
2 files changed, 41 insertions, 0 deletions
diff --git a/client/src/components/Input/Input.jsx b/client/src/components/Input/Input.jsx
new file mode 100644
index 0000000..ee79f3b
--- /dev/null
+++ b/client/src/components/Input/Input.jsx
@@ -0,0 +1,22 @@
+import React from 'react'
+import styles from './Input.module.css'
+
+const Input = ({ label, id, value, type, name }) => {
+ return (
+ <div className={styles.input}>
+ <div className={styles.input__container}>
+ <label htmlFor={id}>{label}</label>
+ <input
+ className={styles.input__field}
+ type={type}
+ id={id}
+ name={name}
+ value={value}
+ required
+ />
+ </div>
+ </div>
+ )
+}
+
+export default Input
diff --git a/client/src/components/Input/Input.module.css b/client/src/components/Input/Input.module.css
new file mode 100644
index 0000000..cafb5f1
--- /dev/null
+++ b/client/src/components/Input/Input.module.css
@@ -0,0 +1,19 @@
+.input {
+ display: flex;
+ justify-content: center;
+ font-family: 'Barlow';
+ font-size: var(--font-medium-s);
+}
+
+.input__container {
+ display: flex;
+ flex-direction: column;
+}
+
+.input__field {
+ width: 300px;
+ margin: 10px 0px;
+ padding: 20px 10px;
+ border: 3px solid;
+ border-radius: 10px;
+}