UNPKG

@voiceiq/web-components

Version:

VoiceIQ Web Component library

42 lines (41 loc) 1.23 kB
import RollingCache from '../../Util/RollingCache'; export interface AvatarInformation { initials: string; backgroundColour: string; textColour: string; } /** * Avatar service * Handles all avatar related logic * * @type {AvatarService} */ declare class AvatarService { /** * PRIVATE * Cache layer */ _cache: RollingCache; /** * All background colour options */ backgroundColours: string[]; /** * Gets the avatar information from given name */ getAvatarInformation: (name: string, backgroundColourOverride?: string | null | undefined) => AvatarInformation; /** * Gets the initials to display on the avatar */ getInitials: (name: string, backgroundColourOverride?: string | null | undefined) => string; /** * Gets the background colour on the avatar */ getBackgroundColour: (name: string, backgroundColourOverride?: string | null | undefined) => string; /** * Gets the text colour on the avatar */ getTextColour: (name: string, backgroundColourOverride?: string | null | undefined) => string; } declare const _default: AvatarService; export default _default;