Skip to content

Commit

Permalink
✨ Provide option for Authcore social login pane position (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
nwingt authored Sep 5, 2024
1 parent 1849ded commit 369dc2b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ export class LikeCoinWalletConnector {
options.authcoreClientId || SOCIAL_LOGIN_OPTIONS.DEFAULT,
authcoreApiHost: options.authcoreApiHost || 'https://authcore.like.co',
authcoreRedirectUrl: options.authcoreRedirectUrl || '',
authcoreSocialLoginPanePosition:
options.authcoreSocialLoginPanePosition || 'top',

onEvent: options.onEvent || (() => {}),
};
Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export interface LikeCoinWalletConnectorConfig {
authcoreClientId?: string;
authcoreApiHost?: string;
authcoreRedirectUrl?: string;
authcoreSocialLoginPanePosition?: 'top' | 'bottom';

language?: string;

Expand Down
2 changes: 1 addition & 1 deletion src/utils/authcore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export async function initAuthcore(
container: containerId,
root: `${authcoreApiHost}/widgets`,
initialScreen: initialScreen,
socialLoginPaneStyle: 'top',
socialLoginPaneStyle: options.authcoreSocialLoginPanePosition,
socialLoginPaneOption: 'grid',
internal: true,
language: options.language?.toLowerCase().includes('zh') ? 'zh-hk' : 'en',
Expand Down

0 comments on commit 369dc2b

Please sign in to comment.