export interface Button { /** * Callback function to be enacted onclick. */ callback: (value?: any) => void; /** * Text shown on the button. */ label: string; /** * Unique identifier for the button. */ id: string; } /** * A maximum of 3 buttons can be supplied. */ export type ButtonArray = [] | [Button] | [Button, Button] | [Button, Button, Button]; /** * Defines the user profile api. */ export interface UserProfileApi { /** * Adds custom button(s) to the profile dropdown and enacts a callback onclick. * Custom user profile buttons may be reset by entering a null parameter. * A maximum of 3 custom buttons will be displayed in the User Profile popover. * * ```typescript * userProfile.setButtons([ * { * callback: () => {}, * label: 'Alpha', * id: 'alpha' * }, * { * callback: () => {}, * label: 'View My Profile', * id: 'viewprofile' * } * ]); * ``` */ setButtons(buttons: ButtonArray | null): void; } declare const userProfile: UserProfileApi; export default userProfile;