matrix-react-sdk
Version:
SDK for matrix.org using React
16 lines (15 loc) • 886 B
TypeScript
import { RoomMember } from "matrix-js-sdk/src/models/room-member";
import { User } from "matrix-js-sdk/src/models/user";
import { Room } from "matrix-js-sdk/src/models/room";
export declare type ResizeMethod = "crop" | "scale";
export declare function avatarUrlForMember(member: RoomMember, width: number, height: number, resizeMethod: ResizeMethod): string;
export declare function avatarUrlForUser(user: User, width: number, height: number, resizeMethod?: ResizeMethod): string;
export declare function defaultAvatarUrlForString(s: string): string;
/**
* returns the first (non-sigil) character of 'name',
* converted to uppercase
* @param {string} name
* @return {string} the first letter
*/
export declare function getInitialLetter(name: string): string;
export declare function avatarUrlForRoom(room: Room, width: number, height: number, resizeMethod?: ResizeMethod): string;