small refactor

This commit is contained in:
Davor 2022-08-06 13:04:22 +02:00
parent ac47970cac
commit 4281dd9082
2 changed files with 40 additions and 44 deletions

View file

@ -63,30 +63,28 @@ export const AppInstallModal = ({ open, onClose, appSlug }: AppInstallModalProps
}; };
return ( return (
<> <Modal onClose={handleClose} open={open} onSave={handleSave} isLoading={appLoading} useCancelButton>
<Modal onClose={handleClose} open={open} onSave={handleSave} isLoading={appLoading} useCancelButton> <div className="bg-white px-4">
<div className="bg-white px-4"> <div className="space-y-10 divide-y divide-gray-200">
<div className="space-y-10 divide-y divide-gray-200"> <div>
<div> <div>
<div> <h3 className="text-lg leading-6 font-medium text-gray-900">Install app {appName}</h3>
<h3 className="text-lg leading-6 font-medium text-gray-900">Install app {appName}</h3> </div>
</div>
<div className="mt-6 grid grid-cols-1 gap-y-6 gap-x-4 sm:grid-cols-6"> <div className="mt-6 grid grid-cols-1 gap-y-6 gap-x-4 sm:grid-cols-6">
<div className="sm:col-span-3"> <div className="sm:col-span-3">
<Input <Input
control={control} control={control}
name="subdomain" name="subdomain"
label="Subdomain" label="Subdomain"
onKeyPress={handleKeyPress} onKeyPress={handleKeyPress}
required={false} required={false}
/> />
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</Modal> </div>
</> </Modal>
); );
}; };

View file

@ -29,33 +29,31 @@ export const GeneralTab = () => {
}; };
return ( return (
<> <form onSubmit={handleSubmit(onSubmit)}>
<form onSubmit={handleSubmit(onSubmit)}> <div className="py-4">
<div className="py-4"> <div className="md:grid md:grid-cols-3 md:gap-6">
<div className="md:grid md:grid-cols-3 md:gap-6"> <div className="md:col-span-2">
<div className="md:col-span-2"> <h3 className="text-lg font-medium leading-6 text-gray-900">Automatic updates</h3>
<h3 className="text-lg font-medium leading-6 text-gray-900">Automatic updates</h3> <p className="mt-1 text-sm text-gray-500">
<p className="mt-1 text-sm text-gray-500"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et nibh sit amet mauris faucibus molestie
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et nibh sit amet mauris faucibus molestie gravida at orci.
gravida at orci. </p>
</p> </div>
</div> <div className="my-auto ml-auto">
<div className="my-auto ml-auto"> <Switch control={control} name="automaticUpdates" />
<Switch control={control} name="automaticUpdates" />
</div>
</div> </div>
</div> </div>
<div className="py-3 sm:flex"> </div>
<div className="ml-auto sm:flex sm:flex-row-reverse"> <div className="py-3 sm:flex">
<button <div className="ml-auto sm:flex sm:flex-row-reverse">
type="submit" <button
className="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-primary-600 text-base font-medium text-white hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 sm:ml-3 sm:w-auto sm:text-sm" type="submit"
> className="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-primary-600 text-base font-medium text-white hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 sm:ml-3 sm:w-auto sm:text-sm"
Save changes >
</button> Save changes
</div> </button>
</div> </div>
</form> </div>
</> </form>
); );
}; };