in dashboards-notifications/public/pages/Emails/CreateSender.tsx [87:139]
senderName: validateSenderName(senderName),
email: validateEmail(email),
host: validateHost(host),
port: validatePort(port),
};
setInputErrors(errors);
return !Object.values(errors).reduce(
(errorFlag, error) => errorFlag || error.length > 0,
false
);
};
return (
<>
<EuiTitle size="l">
<h1>{`${props.edit ? 'Edit' : 'Create'} SMTP sender`}</h1>
</EuiTitle>
<EuiSpacer />
<ContentPanel
bodyStyles={{ padding: 'initial' }}
title="Configure sender"
titleSize="s"
panelStyles={{ maxWidth: 1000 }}
>
<CreateSenderForm
senderName={senderName}
setSenderName={setSenderName}
email={email}
setEmail={setEmail}
host={host}
setHost={setHost}
port={port}
setPort={setPort}
encryption={encryption}
setEncryption={setEncryption}
inputErrors={inputErrors}
setInputErrors={setInputErrors}
/>
</ContentPanel>
<EuiSpacer />
<EuiFlexGroup justifyContent="flexEnd" style={{ maxWidth: 1024 }}>
<EuiFlexItem grow={false}>
<EuiButtonEmpty href={`#${ROUTES.EMAIL_SENDERS}`}>
Cancel
</EuiButtonEmpty>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButton
fill
isLoading={loading}
onClick={async () => {