mirror of
https://github.com/logto-io/logto.git
synced 2024-12-30 20:33:54 -05:00
style(console): set passwordless connector creation modal to large by default (#4072)
This commit is contained in:
parent
5ed7750de7
commit
8969d38c54
1 changed files with 9 additions and 1 deletions
|
@ -86,6 +86,14 @@ function CreateForm({ onClose, isOpen: isFormOpen, type }: Props) {
|
||||||
}, [type]);
|
}, [type]);
|
||||||
|
|
||||||
const modalSize = useMemo(() => {
|
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) {
|
if (groups.length <= 2) {
|
||||||
return 'medium';
|
return 'medium';
|
||||||
}
|
}
|
||||||
|
@ -95,7 +103,7 @@ function CreateForm({ onClose, isOpen: isFormOpen, type }: Props) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return 'xlarge';
|
return 'xlarge';
|
||||||
}, [groups.length]);
|
}, [groups.length, type]);
|
||||||
|
|
||||||
if (!isFormOpen) {
|
if (!isFormOpen) {
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in a new issue