-
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 17 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,77 @@ | ||
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 ( | ||
<div className="main-container"> | ||
<div className="container"> | ||
<form onSubmit={formik.handleSubmit}> | ||
<div className="inputs"> | ||
<div className="title">Scan Form</div> | ||
<label className="head" htmlFor="ScanTitle"> | ||
Scan Title | ||
</label> | ||
<div> | ||
<input | ||
id="scanTitle" | ||
name="ScanTitle" | ||
type="text" | ||
onChange={formik.handleChange} | ||
value={formik.values.ScanTitle} | ||
/> | ||
</div> | ||
</div> | ||
<div> | ||
<div className="inputs"> | ||
<label className="head" htmlFor="ScanDescription"> | ||
Scan Description | ||
</label> | ||
<div> | ||
<textarea | ||
rows={parseInt('3')} | ||
cols={parseInt('30')} | ||
id="ScanDescription" | ||
name="ScanDescription" | ||
onChange={formik.handleChange} | ||
value={formik.values.ScanDescription} | ||
/> | ||
</div> | ||
</div> | ||
<div className="inputs"> | ||
<label className="head" htmlFor="Others"> | ||
Others | ||
</label> | ||
<div> | ||
<textarea | ||
rows={parseInt('2')} | ||
cols={parseInt('30')} | ||
id="Others" | ||
name="Others" | ||
onChange={formik.handleChange} | ||
value={formik.values.Others} | ||
/> | ||
</div> | ||
</div> | ||
<div className="buttons "> | ||
<button type="submit" className="submit"> | ||
Submit | ||
</button> | ||
<Link to={`/scan`}> | ||
<button className="cancel">Cancel</button> | ||
</Link> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
); | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
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="parent-button"> | ||
<Link to={`/scan/scanform`}> | ||
<button className="btn btn-outline btn-ghost add">+</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