dfrankland/react-amphtml

AmpIframe does not support height and width and layout attributes.

ivanbechevmrf opened this issue · 0 comments

Hello,

When trying to use layout, height and width attributes on AmpIframe I get Typescript error, saying that these properties do not exist in the respective type. After digging a little deeper, I found that the responsible type (AmpIframeProps) extends with generic type React.HTMLAttributes as opposed to React.IframeHTMLAttributes:

filename: amphtml.d.ts

export interface AmpIframeProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>,
HTMLElement> {
    allow?: string | undefined;
    allowfullscreen?: boolean | undefined;
    allowpaymentrequest?: boolean | undefined;
    ...

Screenshot 2020-10-02 at 15 39 37