0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-03-03 22:15:32 -05:00

style(console): set passwordless connector creation modal to large by default (#4072)

This commit is contained in:
Xiao Yijun 2023-06-25 10:48:18 +08:00 committed by GitHub
parent 5ed7750de7
commit 8969d38c54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;