From 8969d38c54ab9a65f3ccfd1d8b17a74e9acf5eec Mon Sep 17 00:00:00 2001 From: Xiao Yijun Date: Sun, 25 Jun 2023 10:48:18 +0800 Subject: [PATCH] style(console): set passwordless connector creation modal to large by default (#4072) --- .../console/src/pages/Connectors/CreateForm/index.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/console/src/pages/Connectors/CreateForm/index.tsx b/packages/console/src/pages/Connectors/CreateForm/index.tsx index 609e59d0e..8b7926e59 100644 --- a/packages/console/src/pages/Connectors/CreateForm/index.tsx +++ b/packages/console/src/pages/Connectors/CreateForm/index.tsx @@ -86,6 +86,14 @@ function CreateForm({ onClose, isOpen: isFormOpen, type }: Props) { }, [type]); const modalSize = useMemo(() => { + /** + * Note: + * Fix the size to large, since now we have little passwordless connectors. + */ + if (type !== ConnectorType.Social) { + return 'large'; + } + if (groups.length <= 2) { return 'medium'; } @@ -95,7 +103,7 @@ function CreateForm({ onClose, isOpen: isFormOpen, type }: Props) { } return 'xlarge'; - }, [groups.length]); + }, [groups.length, type]); if (!isFormOpen) { return null;