@@ -45,17 +45,21 @@ function EditQn({ question, handleClose, editQuestion }) {
45
45
46
46
return (
47
47
< div className = 'd-flex bg-primary justify-content-center align-items-center' >
48
- < div className = "w-100 bg-white p -3" >
48
+ < div className = "w-100 bg-white px-3 pb -3" >
49
49
< form onSubmit = { Update } >
50
- < h2 > Update Question</ h2 >
51
50
{ error && < div className = "alert alert-danger" > { error } </ div > }
51
+ < div className = "mb-2" >
52
+ < label htmlFor = "" > Title</ label >
53
+ < input type = "text" placeholder = 'Shortest Distance' className = 'form-control'
54
+ value = { title } onChange = { e => setTitle ( e . target . value ) } />
55
+ </ div >
52
56
< div className = "mb-2" >
53
57
< label htmlFor = "" > Category</ label >
54
58
< input type = "text" placeholder = 'Data Structures' className = 'form-control'
55
59
value = { category . join ( "," ) } onChange = { ( e ) => setCategory ( e . target . value . split ( "," ) ) } />
56
60
</ div >
57
- < div className = "container mt -3" >
58
- < h3 > Complexity</ h3 >
61
+ < div className = "container my -3" >
62
+ < h5 > Complexity</ h5 >
59
63
< div className = "form-check" >
60
64
< input type = "radio" id = "easy" value = "Easy" checked = { complexity === "Easy" } onChange = { ( e ) => setComplexity ( e . target . value ) } />
61
65
< label className = "form-check-label" htmlFor = "easy" > Easy</ label >
@@ -69,16 +73,12 @@ function EditQn({ question, handleClose, editQuestion }) {
69
73
< label className = "form-check-label" htmlFor = "hard" > Hard</ label >
70
74
</ div >
71
75
</ div >
72
- < div className = "mb-2 " >
76
+ < div className = "mb-3 " >
73
77
< label htmlFor = "" > Description</ label >
74
78
< input type = "text" placeholder = 'Return the largest....' className = 'form-control'
75
79
value = { description } onChange = { ( e ) => setDescription ( e . target . value ) } />
76
80
</ div >
77
- < div className = "mb-2" >
78
- < label htmlFor = "" > Title</ label >
79
- < input type = "text" placeholder = 'Shortest Distance' className = 'form-control'
80
- value = { title } onChange = { e => setTitle ( e . target . value ) } />
81
- </ div >
81
+
82
82
< button className = "btn btn-success" > Update</ button >
83
83
</ form >
84
84
</ div >
0 commit comments