diff --git a/lib/build/recipe/thirdparty/providers/custom.d.ts b/lib/build/recipe/thirdparty/providers/custom.d.ts index b0d6b91c3..85d1a5e22 100644 --- a/lib/build/recipe/thirdparty/providers/custom.d.ts +++ b/lib/build/recipe/thirdparty/providers/custom.d.ts @@ -1,7 +1,9 @@ +/// import type { CustomProviderConfig } from "./types"; import Provider from "."; export default class Custom extends Provider { + private logo; constructor(config: CustomProviderConfig); - getLogo: () => undefined; + getLogo: () => JSX.Element | undefined; static init(config: CustomProviderConfig): Provider; } diff --git a/lib/build/recipe/thirdparty/providers/types.d.ts b/lib/build/recipe/thirdparty/providers/types.d.ts index da89e94e5..e1f85cd36 100644 --- a/lib/build/recipe/thirdparty/providers/types.d.ts +++ b/lib/build/recipe/thirdparty/providers/types.d.ts @@ -21,6 +21,10 @@ export declare type BuiltInProviderConfig = { export declare type CustomProviderConfig = { id: string; name: string; + /** + * Provider Logo. + */ + logo?: JSX.Element; buttonComponent?: | FC<{ name: string; diff --git a/lib/build/thirdparty-shared.js b/lib/build/thirdparty-shared.js index 9ecf3f819..03a381834 100644 --- a/lib/build/thirdparty-shared.js +++ b/lib/build/thirdparty-shared.js @@ -1114,8 +1114,9 @@ var Custom = /** @class */ (function (_super) { function Custom(config) { var _this = _super.call(this, config) || this; _this.getLogo = function () { - return undefined; + return _this.logo; }; + _this.logo = config.logo; return _this; } /* diff --git a/lib/ts/recipe/thirdparty/providers/custom.tsx b/lib/ts/recipe/thirdparty/providers/custom.tsx index 395e8a4ad..c8c42beb2 100644 --- a/lib/ts/recipe/thirdparty/providers/custom.tsx +++ b/lib/ts/recipe/thirdparty/providers/custom.tsx @@ -23,15 +23,17 @@ import Provider from "."; * Class. */ export default class Custom extends Provider { + private logo: JSX.Element | undefined; /* * Constructor. */ constructor(config: CustomProviderConfig) { super(config); + this.logo = config.logo; } - getLogo = (): undefined => { - return undefined; + getLogo = (): JSX.Element | undefined => { + return this.logo; }; /* diff --git a/lib/ts/recipe/thirdparty/providers/types.ts b/lib/ts/recipe/thirdparty/providers/types.ts index 94f3facc0..e10db10d3 100644 --- a/lib/ts/recipe/thirdparty/providers/types.ts +++ b/lib/ts/recipe/thirdparty/providers/types.ts @@ -56,6 +56,11 @@ export type CustomProviderConfig = { */ name: string; + /** + * Provider Logo. + */ + logo?: JSX.Element; + /* * Button Component */