optional additionalButtons
This commit is contained in:
1 parent
3fc4160b88
commit
1552018796
2 files changed
+12
-8
No files matched your search
@@ -23,6 +23,7 @@ export const DialogInput = ({
|
|||||||
children,
|
children,
|
||||||
maxWidth,
|
maxWidth,
|
||||||
fullWidth = false,
|
fullWidth = false,
|
||||||
|
additionalButtons,
|
||||||
}: {
|
}: {
|
||||||
open: boolean;
|
open: boolean;
|
||||||
title?: string;
|
title?: string;
|
||||||
@@ -37,6 +38,7 @@ export const DialogInput = ({
|
|||||||
children?: ReactNode;
|
children?: ReactNode;
|
||||||
maxWidth?: DialogProps["maxWidth"];
|
maxWidth?: DialogProps["maxWidth"];
|
||||||
fullWidth?: boolean;
|
fullWidth?: boolean;
|
||||||
|
additionalButtons?: ReactNode;
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
return (
|
return (
|
||||||
@@ -59,6 +61,7 @@ export const DialogInput = ({
|
|||||||
>
|
>
|
||||||
{cancelText ?? t("common.buttons.cancel")}
|
{cancelText ?? t("common.buttons.cancel")}
|
||||||
</Button>
|
</Button>
|
||||||
|
{additionalButtons}
|
||||||
{onConfirm && (
|
{onConfirm && (
|
||||||
<Button
|
<Button
|
||||||
loading={loading}
|
loading={loading}
|
||||||
|
|||||||
@@ -32,6 +32,15 @@ export const InviteTeamMemberDialog = ({
|
|||||||
maxWidth="sm"
|
maxWidth="sm"
|
||||||
fullWidth
|
fullWidth
|
||||||
confirmText={t("pages.account.team.invite.sendInvite")}
|
confirmText={t("pages.account.team.invite.sendInvite")}
|
||||||
|
additionalButtons={
|
||||||
|
<Button
|
||||||
|
variant="contained"
|
||||||
|
color="primary"
|
||||||
|
onClick={() => {}}
|
||||||
|
>
|
||||||
|
{t("pages.account.team.invite.generateToken")}
|
||||||
|
</Button>
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<Stack
|
<Stack
|
||||||
gap={theme.spacing(4)}
|
gap={theme.spacing(4)}
|
||||||
@@ -58,14 +67,6 @@ export const InviteTeamMemberDialog = ({
|
|||||||
</MenuItem>
|
</MenuItem>
|
||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
<Button
|
|
||||||
sx={{ alignSelf: "flex-end" }}
|
|
||||||
variant="contained"
|
|
||||||
color="primary"
|
|
||||||
onClick={() => {}}
|
|
||||||
>
|
|
||||||
{t("pages.account.team.invite.generateToken")}
|
|
||||||
</Button>
|
|
||||||
</Stack>
|
</Stack>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user