-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/scan info #45
Changes from 19 commits
7ae3467
f8c82a6
029effd
e2a6f29
4bdd34e
418854f
7040753
a064ab9
8570d9a
cf19108
430addf
500d2eb
1541dcd
1e64998
1e1b125
bab35ba
95e39ad
00fb157
79e6d99
52d1ebd
b6bf023
731a793
4dc115a
a213801
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Christiantyemele marked this conversation as resolved.
Show resolved
Hide resolved
Christiantyemele marked this conversation as resolved.
Show resolved
Hide resolved
|
Large diffs are not rendered by default.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cancel these changes |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
import { useFormik } from 'formik'; | ||
import { Link } from 'react-router-dom'; | ||
|
||
export const InfoForm = () => { | ||
const formik = useFormik({ | ||
initialValues: { | ||
ScanTitle: '', | ||
ScanDescription: '', | ||
Others: '', | ||
}, | ||
onSubmit: () => { | ||
alert('information submitted'); | ||
}, | ||
}); | ||
return ( | ||
<form className="max-w-sm mx-auto" onSubmit={formik.handleSubmit}> | ||
<div className="mb-5"> | ||
<div className="flex justify-center font-normal md:font-bold mt-10"> | ||
Scan Form | ||
</div> | ||
<label | ||
htmlFor="text" | ||
className="block mb-2 text-sm font-medium text-white-900" | ||
> | ||
Scan Title | ||
</label> | ||
<input | ||
type="text" | ||
id="ScanTitle" | ||
name="ScanTitle" | ||
onChange={formik.handleChange} | ||
value={formik.values.ScanTitle} | ||
className="shadow-sm bg-white-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 dark:shadow-sm-light" | ||
required | ||
/> | ||
</div> | ||
<div className="mb-5"> | ||
<label | ||
htmlFor="ScanDescription" | ||
className="block mb-2 text-sm font-medium text-white-900" | ||
> | ||
Scan Description | ||
</label> | ||
<textarea | ||
id="ScanDescription" | ||
name="ScanDescription" | ||
onChange={formik.handleChange} | ||
value={formik.values.ScanDescription} | ||
rows={3} | ||
className="shadow-sm bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 dark:shadow-sm-light" | ||
required | ||
/> | ||
</div> | ||
<div className="mb-5"> | ||
<label | ||
htmlFor="Others" | ||
className="block mb-2 text-sm font-medium text-gray-900" | ||
> | ||
Others | ||
</label> | ||
<textarea | ||
id="Others" | ||
name="Others" | ||
onChange={formik.handleChange} | ||
value={formik.values.Others} | ||
className="shadow-sm bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 dark:shadow-sm-light" | ||
required | ||
/> | ||
</div> | ||
<Link to={`/scan`}> | ||
<button className="bg-gray-500 text-white font-bold py-2 px-4 rounded opacity-50 ml-14"> | ||
Cancel | ||
</button> | ||
</Link> | ||
<button className="bg-blue-600 text-white font-bold py-2 px-4 rounded ml-14"> | ||
Submit | ||
</button> | ||
</form> | ||
); | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Link } from 'react-router-dom'; | ||
|
||
export const InfoButton = () => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This component's name doesn't match the file name There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done sir @stephane-segning |
||
return ( | ||
<div className="flex justify-center mt-20"> | ||
<Link to={`/scan/scanform`}> | ||
<button className="inline-flex items-center justify-center w-10 h-10 mr-2 text-indigo-100 transition-colors duration-150 bg-indigo-700 rounded-lg focus:shadow-outline hover:bg-indigo-800"> | ||
<svg className="w-4 h-4 fill-current" viewBox="0 0 20 20"> | ||
<path | ||
d="M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z" | ||
clipRule="evenodd" | ||
fillRule="evenodd" | ||
></path> | ||
</svg> | ||
</button> | ||
</Link> | ||
</div> | ||
); | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,77 @@ | ||
@import 'tailwindcss/base'; | ||
@import 'tailwindcss/components'; | ||
@import 'tailwindcss/utilities'; | ||
|
||
.container { | ||
display: flex; | ||
padding: 1em; | ||
align-items: center; | ||
min-width: 60dvh; | ||
background-color: gainsboro; | ||
border: 2px solid white; | ||
justify-content: space-evenly; | ||
border-radius: 10px; | ||
max-width: 580px; | ||
} | ||
|
||
.main-container { | ||
margin-top: 5em; | ||
display: flex; | ||
justify-content: center; | ||
min-height: 368px; | ||
min-width: 172px; | ||
} | ||
|
||
.submit { | ||
margin: 1em; | ||
color: blue; | ||
} | ||
|
||
.cancel { | ||
margin: 1em; | ||
color: red; | ||
} | ||
|
||
.buttons { | ||
display: grid; | ||
justify-content: space-evenly; | ||
} | ||
|
||
.inputs { | ||
margin: 0.5em; | ||
} | ||
|
||
.title { | ||
display: flex; | ||
justify-content: center; | ||
margin-bottom: 2em; | ||
font-size: 1.3em; | ||
} | ||
|
||
.head { | ||
background: rgb(226 236 245); | ||
font-size: 0.99em; | ||
line-height: 1.1em; | ||
} | ||
|
||
.add::after { | ||
content: 'Add Scan'; | ||
position: absolute; | ||
visibility: hidden; | ||
} | ||
|
||
.parent-button { | ||
display: grid; | ||
justify-content: center; | ||
align-items: end; | ||
margin-top: 30em; | ||
} | ||
|
||
.add:hover::after { | ||
visibility: visible; | ||
opacity: 1; | ||
} | ||
|
||
.add { | ||
cursor: pointer; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove this and use tailwind only There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done sir @stephane-segning |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please @Christiantyemele remove this file. Here we're using only yarn.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Done