import { IStylableProps } from '../Generic.types'; export interface IAvatarSelectorProps extends IStylableProps { /** * The ID to use for the input and for/htmlFor * @default random string */ id?: string; /** * Src to avatar image */ src?: string; /** * Alt */ alt?: string; /** * A list of file extensions to accept NB! Not MIME types due to drag and drop validation * @default '.jpg,.jpeg,.png' */ accept?: string; /** * Name of input type="file" */ name?: string; /** * Max size of uploaded image in bytes * @default 1000000 (1mb) */ maxSize?: number; /** * Is the image a required field. * @default false */ isRequired?: boolean; /** * If the user should be able to remove a valid image when uploaded without uploading another */ clearable?: boolean; /** * onChange method */ onChange?: (file?: File, src?: string) => any; /** * Text to show in button to remove avatar image */ clearAvatarText?: string; /** * If the field is valid. Used for controlling aria tags on input * @default true */ isValid?: boolean; /** * The id to the error message. To be used in aria-describedby attribute on input. */ errorMessageId?: string; /** * On validation error method */ onValidationError?: (errorMessage?: string) => any; } export default IAvatarSelectorProps;