Skip to content

Commit

Permalink
TS
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcarpenter committed Oct 17, 2024
1 parent dfc0525 commit d4a3f57
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions packages/ui/src/contexts/AppearanceContext.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import { createContextAndHook, useDeepEqualMemo } from '@clerk/shared/react';
import type { Appearance as CurrentAppearance, Layout as CurrentLayout } from '@clerk/types';
import type {
Appearance as CurrentAppearance,
Layout as CurrentLayout,
OAuthProvider,
Web3Provider,
} from '@clerk/types';
import React from 'react';

import type { PROVIDERS } from '~/primitives/icons/providers';
import { fullTheme } from '~/themes';

type Provider = OAuthProvider | Web3Provider;

type AlertDescriptorIdentifier = 'alert' | 'alert__error' | 'alert__warning' | 'alertIcon';
type ButtonDescriptorIdentifier =
| 'button'
Expand All @@ -14,7 +20,7 @@ type ButtonDescriptorIdentifier =
| 'buttonPrimaryDefault'
| 'buttonSecondaryDefault'
| 'buttonConnectionDefault'
| `buttonConnection__${keyof typeof PROVIDERS}`
| `buttonConnection__${Provider}`
| 'buttonDisabled'
| 'buttonBusy'
| 'buttonText'
Expand Down Expand Up @@ -177,7 +183,7 @@ function mergeElementsAppearanceConfig(
}

if (!result) {
throw new Error(`Unable to merge ElementsAppearanceConfigs: ${a} and ${b}`);
throw new Error(`Unable to merge ElementsAppearanceConfigs: ${JSON.stringify(a)} and ${JSON.stringify(b)}`);
}

return result;
Expand Down

0 comments on commit d4a3f57

Please sign in to comment.