import * as React from 'react';
const FallbackImg = ({ src, alt, className, fallback }) => {
    const [isSrcValid, setIsSrcValid] = React.useState(true);
    if (src && isSrcValid) {
        return React.createElement("img", { className: className, src: src, alt: alt, onError: () => setIsSrcValid(false) });
    }
    return React.createElement(React.Fragment, null, fallback);
};
export default FallbackImg;
