Skip to content

Commit cd9f7bd

Browse files
committed
docs: Add JSDoc documentation for getSocialIcon function
1 parent afb6343 commit cd9f7bd

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

packages/thirdweb/src/react/core/utils/walletIcon.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,17 @@ export const socialIcons = {
5050
github: githubIconUri,
5151
};
5252

53-
// TODO: this should return actual <svg> elements so they can be themed
54-
export function getSocialIcon(provider: AuthOption | ({} & string)) {
53+
/**
54+
* Gets the icon URI for a given social authentication provider
55+
* @param provider - The authentication provider to get the icon for
56+
* @returns A data URI containing the SVG icon for the provider, or a generic wallet icon if the provider is not recognized
57+
* @example
58+
* ```tsx
59+
* const googleIcon = getSocialIcon("google")
60+
* const appleIcon = getSocialIcon("apple")
61+
* ```
62+
*/
63+
export function getSocialIcon(provider: AuthOption | ({} & string)): string {
5564
switch (provider) {
5665
case "google":
5766
return googleIconUri;

0 commit comments

Comments
 (0)