Skip to content

Commit 6b4864b

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

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,16 @@ export const socialIcons = {
5050
github: githubIconUri,
5151
};
5252

53-
// TODO: this should return actual <svg> elements so they can be themed
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+
*/
5463
export function getSocialIcon(provider: AuthOption | ({} & string)) {
5564
switch (provider) {
5665
case "google":

0 commit comments

Comments
 (0)