chore: initial import for test contour
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
export const EditElementForm = ({
|
||||
navigateBack,
|
||||
header,
|
||||
handleSave,
|
||||
handleDelete = null,
|
||||
isAddSpecialist = false,
|
||||
children
|
||||
}) => (
|
||||
<div className="container-fluid">
|
||||
<button
|
||||
className="btn btn-link mb-3"
|
||||
onClick={ () => navigateBack() }
|
||||
>
|
||||
← Назад
|
||||
</button>
|
||||
<div className="card shadow mb-4">
|
||||
<div className="card-header py-3 d-flex justify-content-between align-items-center">
|
||||
<h6 className="m-0 font-weight-bold text-primary">
|
||||
{ header }
|
||||
</h6>
|
||||
</div>
|
||||
<div className="card-body">
|
||||
{ children }
|
||||
<div className="d-flex justify-content-start">
|
||||
<button
|
||||
className="btn btn-primary mr-2"
|
||||
onClick={ handleSave }
|
||||
>
|
||||
Сохранить
|
||||
</button>
|
||||
<button
|
||||
className="btn btn-secondary"
|
||||
onClick={ () => navigateBack() }
|
||||
>
|
||||
Отмена
|
||||
</button>
|
||||
{!isAddSpecialist &&
|
||||
<button
|
||||
className="btn btn-danger ml-auto"
|
||||
onClick={ handleDelete }
|
||||
>
|
||||
Удалить
|
||||
</button>}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
Reference in New Issue
Block a user