badges
Version:
The definitive collection of badges for rendering
35 lines • 1.29 kB
TypeScript
import * as badges from './badges.js';
export { badges };
/**
* Render a specified badge with the appropriate wrapping (div if block badge, span if inline badge)
* @method renderBadge
* @param badgeName The name of the badge to render
* @param config The configuration to pass to the badge render method
* @return The rendered badge
*/
export declare function renderBadge(badgeName: string, config?: {}): string;
export interface RenderOptions {
filterCategory?: false | string;
filterScripts?: boolean;
}
export type BadgeEntry = string | [string, object];
export type BadgeEntries = BadgeEntry[];
export type BadgesList = BadgeEntries;
export type BadgesOptions = RenderOptions;
export interface BadgesConfig {
[key: string]: any;
}
export interface BadgesField {
list: BadgeEntries;
config?: BadgesConfig;
options?: RenderOptions;
}
/**
* Render specified badges with wrapping
* @param list The list of badge names to render
* @param config The configuration to render the badge with
* @param options An object that defaults to `{filterCategory: false, filterScripts: false}`
* @return The rendered badges
*/
export declare function renderBadges(list: BadgesList, config?: BadgesConfig, options?: RenderOptions): string;
//# sourceMappingURL=index.d.ts.map