Skip to content

Commit a1707f6

Browse files
committed
[SDK] Fix: Add JSDoc documentation for getSocialIcon function (#5395)
CNCT-2324 <!-- start pr-codex --> --- ## PR-Codex overview This PR enhances the documentation for the `getSocialIcon` function, providing a detailed JSDoc comment that explains its purpose, parameters, return value, and includes usage examples. ### Detailed summary - Added a JSDoc comment for the `getSocialIcon` function. - Described the function's purpose, parameters, return value, and provided usage examples. - Changed the return type of `getSocialIcon` to explicitly specify it returns a `string`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent f31801e commit a1707f6

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)