|
| 1 | +import cls from "./AddQuestionPage.module.css"; |
| 2 | +import { Button } from "../../components/Button"; |
| 3 | + |
| 4 | +export const AddQuestionPage = () => { |
| 5 | + return ( |
| 6 | + <> |
| 7 | + <h1 className={cls.formTitle}>Add new question</h1> |
| 8 | + |
| 9 | + <div className={cls.formContainer}> |
| 10 | + <form action="" className={cls.form}> |
| 11 | + <div className={cls.formControl}> |
| 12 | + <label htmlFor="questionField">Question:</label> |
| 13 | + <textarea |
| 14 | + defaultValue={"defaultValue"} |
| 15 | + name="question" |
| 16 | + id="questionField" |
| 17 | + cols="30" |
| 18 | + rows="2" |
| 19 | + required |
| 20 | + placeholder="Please enter your question" |
| 21 | + ></textarea> |
| 22 | + </div> |
| 23 | + |
| 24 | + <div className={cls.formControl}> |
| 25 | + <label htmlFor="answerField">Short answer:</label> |
| 26 | + <textarea |
| 27 | + defaultValue={"defaultValue"} |
| 28 | + name="answer" |
| 29 | + id="answerField" |
| 30 | + cols="30" |
| 31 | + rows="2" |
| 32 | + required |
| 33 | + placeholder="Please enter a short answer" |
| 34 | + ></textarea> |
| 35 | + </div> |
| 36 | + |
| 37 | + <div className={cls.formControl}> |
| 38 | + <label htmlFor="descriptionField">Description:</label> |
| 39 | + <textarea |
| 40 | + defaultValue={"defaultValue"} |
| 41 | + name="description" |
| 42 | + id="descriptionField" |
| 43 | + cols="30" |
| 44 | + rows="5" |
| 45 | + required |
| 46 | + placeholder="Please enter a full description" |
| 47 | + ></textarea> |
| 48 | + </div> |
| 49 | + |
| 50 | + <div className={cls.formControl}> |
| 51 | + <label htmlFor="resoursesField">Resourses:</label> |
| 52 | + <textarea |
| 53 | + defaultValue={"defaultValue"} |
| 54 | + name="resourses" |
| 55 | + id="resoursesField" |
| 56 | + cols="30" |
| 57 | + rows="5" |
| 58 | + required |
| 59 | + placeholder="Please enter resourses separated by commas" |
| 60 | + ></textarea> |
| 61 | + </div> |
| 62 | + |
| 63 | + <div className={cls.formControl}> |
| 64 | + <label htmlFor="levelField">Level:</label> |
| 65 | + <select name="level" id="levelField" defaultValue={"defaultValue"}> |
| 66 | + <option disabled>Question level</option> |
| 67 | + <hr /> |
| 68 | + <option value="1">1 - easy</option> |
| 69 | + <option value="2">2 - meduim</option> |
| 70 | + <option value="3">3 - hard</option> |
| 71 | + </select> |
| 72 | + </div> |
| 73 | + |
| 74 | + <label htmlFor="clearFormField" className={cls.clearFormControl}> |
| 75 | + <input className={cls.checkbox} type="checkbox" name="clearForm" id="clearFormField" defaultValue={true}/> |
| 76 | + <span>Clear form after submitting</span> |
| 77 | + </label> |
| 78 | + |
| 79 | + <Button>Add question</Button> |
| 80 | + </form> |
| 81 | + </div> |
| 82 | + </> |
| 83 | + ); |
| 84 | +}; |
0 commit comments