UI changes;

availability form prettify
This commit is contained in:
Dobromir Popov
2024-03-02 22:49:11 +02:00
parent 8de48e1c41
commit ffcfb6b15c
5 changed files with 14 additions and 8 deletions

View File

@ -437,9 +437,10 @@ export default function AvailabilityForm({ publisherId, existingItem, inline, on
}, []);
return (
<div style={{ width: isMobile ? '90%' : 'max-w-xs', margin: '0 auto' }} >
// <div style={{ width: isMobile ? '90%' : 'max-w-xs', margin: '0 auto' }} >
<div className="w-full">
<ToastContainer></ToastContainer>
<form id="formAv" className="form p-5 bg-white shadow-md rounded-lg p-8 pr-12" onSubmit={handleSubmit}>
<form id="formAv" className="form p-5 bg-white shadow-md rounded-lg" onSubmit={handleSubmit}>
<h3 className="text-xl font-semibold mb-5 text-gray-800 border-b pb-2">
{availability.id ? "Редактирай" : "Нова"} възможност
</h3>
@ -508,10 +509,11 @@ export default function AvailabilityForm({ publisherId, existingItem, inline, on
</div>
{/* <input type="hidden" name="isactive" value={availability.isactive} /> */}
<div className="panel-actions">
<button className="action-button" onClick={() => handleCompletion()}> Отмени </button>
<div className="flex justify-between items-center flex-nowrap w-full p-1">
<button className="button border border-blue-500 text-blue-500 bg-transparent hover:text-white focus:outline-none focus:shadow-outline" onClick={() => handleCompletion()}> Отмени </button>
{availability.id && (
<><button className="button bg-red-500 hover:bg-red-700 focus:outline-none focus:shadow-outline" type="button" onClick={handleDelete}>
<><button className="button btn-outline bg-red-500 hover:bg-red-700 focus:outline-none focus:shadow-outline" type="button" onClick={handleDelete}>
Изтрий
</button></>
)}