@bothub-chat/ui
Version:
Bothub UI Components
25 lines (24 loc) • 888 B
TypeScript
import React, { LinkHTMLAttributes } from 'react';
import { ImageLoadingVariant } from './types';
export interface ImageAdaptive {
src: string;
width?: string | number;
height?: string | number;
}
export interface ImageSrc {
mobile?: string | ImageAdaptive;
tablet?: string | ImageAdaptive;
desktop?: string | ImageAdaptive;
}
export interface ImageProps extends Omit<React.ComponentProps<'img'>, 'src' | 'alt' | 'width' | 'height' | 'loading'> {
src?: string | ImageSrc;
width?: string | number;
height?: string | number;
alt?: string;
preload?: boolean;
loading?: ImageLoadingVariant;
fetchPriority?: LinkHTMLAttributes<HTMLLinkElement>['fetchPriority'];
}
export declare const Image: React.ForwardRefExoticComponent<Omit<ImageProps, "ref"> & React.RefAttributes<HTMLImageElement>>;
export * from './types';
export * from './styled';