fix: invite button validation , style: workspace screen (#877)

* fix: invite button validation

* style: workspace screen tab height
This commit is contained in:
Anmol Singh Bhatia 2023-04-19 15:41:46 +05:30 committed by GitHub
parent fb1932e309
commit 390b837561
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 8 deletions

View File

@ -34,6 +34,7 @@ export const InviteMembers: React.FC<Props> = ({ setStep, workspace }) => {
.catch((err) => console.log(err));
};
const checkEmail = watch("emails") && watch("emails").length > 0 ;
return (
<form
className="flex w-full items-center justify-center"
@ -63,7 +64,7 @@ export const InviteMembers: React.FC<Props> = ({ setStep, workspace }) => {
<PrimaryButton
type="submit"
className="flex w-1/2 items-center justify-center text-center"
disabled={isSubmitting}
disabled={isSubmitting || !checkEmail}
size="md"
>
{isSubmitting ? "Inviting..." : "Continue"}

View File

@ -65,10 +65,10 @@ export const Workspace: React.FC<Props> = ({ setStep, setWorkspace }) => {
};
return (
<div className="grid w-full place-items-center">
<div className="grid w-full place-items-center min-h-[490px]">
<Tab.Group
as="div"
className="flex w-full max-w-xl flex-col rounded-[10px] bg-white shadow-md"
className="flex h-full w-full max-w-xl flex-col justify-between rounded-[10px] bg-white shadow-md"
>
<Tab.List
as="div"
@ -97,7 +97,7 @@ export const Workspace: React.FC<Props> = ({ setStep, setWorkspace }) => {
Invited Workspace
</Tab>
</Tab.List>
<Tab.Panels>
<Tab.Panels as="div" className="h-full">
<Tab.Panel>
<CreateWorkspaceForm
onSubmit={(res) => {
@ -108,9 +108,9 @@ export const Workspace: React.FC<Props> = ({ setStep, setWorkspace }) => {
setDefaultValues={setDefaultValues}
/>
</Tab.Panel>
<Tab.Panel>
<div className="mt-6">
<div className="divide-y px-4 pb-8">
<Tab.Panel className="h-full">
<div className="flex flex-col justify-between h-full w-full">
<div className="divide-y px-4 py-7">
{invitations && invitations.length > 0 ? (
invitations.map((invitation) => (
<div key={invitation.id}>

View File

@ -100,7 +100,7 @@ export const CreateWorkspaceForm: React.FC<Props> = ({
onSubmit={handleSubmit(handleCreateWorkspace)}
>
<div className="flex w-full max-w-xl flex-col">
<div className="flex flex-col rounded-[10px] bg-white shadow-md">
<div className="flex flex-col rounded-[10px] bg-white">
<div className="flex flex-col justify-between gap-3 px-4 py-7">
<div className="flex flex-col items-start justify-center gap-2.5">
<span>Workspace name</span>