Skip to content

Commit

Permalink
fix jsdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
Haroenv committed Oct 28, 2020
1 parent 0435d68 commit 38dbec4
Showing 1 changed file with 7 additions and 21 deletions.
28 changes: 7 additions & 21 deletions src/connectors/powered-by/connectPoweredBy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,13 @@ const withUsage = createDocumentationMessageGenerator({
connector: true,
});

/**
* @typedef {Object} PoweredByWidgetOptions
* @property {string} [theme] The theme of the logo ("light" or "dark").
* @property {string} [url] The URL to redirect to.
*/

/**
* @typedef {Object} PoweredByRenderingOptions
* @property {Object} widgetParams All original `PoweredByWidgetOptions` forwarded to the `renderFn`.
*/

/**
* **PoweredBy** connector provides the logic to build a custom widget that will displays
* the logo to redirect to Algolia.
*
* @type {Connector}
* @param {function(PoweredByRenderingOptions, boolean)} renderFn Rendering function for the custom **PoweredBy** widget.
* @param {function} unmountFn Unmount function called when the widget is disposed.
* @return {function} Re-usable widget factory for a custom **PoweredBy** widget.
*/

export type PoweredByRendererOptions = {
/** the url to redirect to on click */
url: string;
};

export type PoweredByConnectorParams = {
/** the url to redirect to on click */
url?: string;
};

Expand All @@ -43,6 +25,10 @@ export type PoweredByConnector = Connector<
PoweredByConnectorParams
>;

/**
* **PoweredBy** connector provides the logic to build a custom widget that will displays
* the logo to redirect to Algolia.
*/
const connectPoweredBy: PoweredByConnector = function connectPoweredBy(
renderFn,
unmountFn = noop
Expand Down

0 comments on commit 38dbec4

Please sign in to comment.