AmpIframe does not support height and width and layout attributes.
ivanbechevmrf opened this issue · 0 comments
ivanbechevmrf commented
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;
...