Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions packages/thirdweb/src/react/core/utils/walletIcon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,17 @@ export const socialIcons = {
github: githubIconUri,
};

// TODO: this should return actual <svg> elements so they can be themed
export function getSocialIcon(provider: AuthOption | ({} & string)) {
/**
* Gets the icon URI for a given social authentication provider
* @param provider - The authentication provider to get the icon for
* @returns A data URI containing the SVG icon for the provider, or a generic wallet icon if the provider is not recognized
* @example
* ```tsx
* const googleIcon = getSocialIcon("google")
* const appleIcon = getSocialIcon("apple")
* ```
*/
export function getSocialIcon(provider: AuthOption | ({} & string)): string {
switch (provider) {
case "google":
return googleIconUri;
Expand Down
Loading