fixed tab controls
This commit was merged in pull request #53.
This commit is contained in:
@@ -1,27 +1,36 @@
|
||||
import React from 'react'
|
||||
import React, {memo} from 'react'
|
||||
|
||||
export default function GeneralTab({name='Full Name', data}) {
|
||||
console.log("Page data == ", data)
|
||||
return (
|
||||
<div className="page-account-form">
|
||||
<div className="p-0">
|
||||
<form>
|
||||
<div className="form-row">
|
||||
<>
|
||||
{Object.entries(data).map(([key, value]) => (
|
||||
<div className="form-group col-md-12">
|
||||
<label htmlFor="name1">{value.name}</label>
|
||||
<input type="text" className="form-control" id={key}
|
||||
value="" />
|
||||
</div>
|
||||
))}
|
||||
</>
|
||||
<div className="form-group col-md-12" style={{textAlign:'right'}}>
|
||||
<button type="submit" className="btn btn-primary">Update</button>
|
||||
const GeneralTab = memo(({name='Full Name', data}) =>{
|
||||
console.log("Page data == ", data)
|
||||
return (
|
||||
<div className="page-account-form">
|
||||
<div className="p-0">
|
||||
<form>
|
||||
<div className="form-row">
|
||||
<>
|
||||
{Object.entries(data)?.map(([key, value]) => (
|
||||
<div className="form-group col-md-12">
|
||||
<label htmlFor="name1">{value.name}</label>
|
||||
{value.controls == 'TEXT' ?
|
||||
<input type="text" className="form-control" id={key} value="" />
|
||||
:value.controls == 'TEXTAREA' ?
|
||||
<textarea rows={5} style={{resize: 'none'}} type="text" className="form-control" id={key} value="" />
|
||||
:
|
||||
null
|
||||
}
|
||||
</div>
|
||||
))}
|
||||
</>
|
||||
<div className="form-group col-md-12" style={{textAlign:'right'}}>
|
||||
<button type="submit" className="btn btn-primary">Update</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
export default GeneralTab
|
||||
Reference in New Issue
Block a user