UNPKG

matrix-react-sdk

Version:
41 lines (40 loc) 1.2 kB
import React from "react"; interface IProps { /** * The current value of the avatar URL, as an mxc URL or a File. * Generally, an mxc URL would be specified until the user selects a file, then * the file supplied by the onChange callback would be supplied here until it's * saved. */ avatar?: string | File; /** * If true, the user cannot change the avatar */ disabled?: boolean; /** * Called when the user has selected a new avatar * The callback is passed a File object for the new avatar data */ onChange?: (f: File) => void; /** * Called when the user wishes to remove the avatar */ removeAvatar?: () => void; /** * The alt text for the avatar */ avatarAltText: string; /** * String to use for computing the colour of the placeholder avatar if no avatar is set */ placeholderId: string; /** * String to use for the placeholder display if no avatar is set */ placeholderName: string; } /** * Component for setting or removing an avatar on something (eg. a user or a room) */ declare const AvatarSetting: React.FC<IProps>; export default AvatarSetting;