react-responsive-picture
Version:
A future-proof responsive image component that supports latest Picture specification
20 lines (19 loc) • 535 B
TypeScript
import * as React from "react";
export declare type Props = {
sources?: {
srcSet: string;
media?: string;
type?: string;
}[];
src?: string;
alt?: string;
className?: string;
sizes?: string;
};
declare class Picture extends React.PureComponent<Props> {
componentDidMount(): void;
renderSources(): JSX.Element | (JSX.Element | null)[] | null;
renderImage(props: Exclude<Props, "sources">, skipSizes?: boolean): JSX.Element;
render(): JSX.Element;
}
export default Picture;