Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AmpIframe does not support height and width and layout attributes. #123

Open
ivanbechevmrf opened this issue Oct 2, 2020 · 0 comments
Open

Comments

@ivanbechevmrf
Copy link

ivanbechevmrf commented Oct 2, 2020

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

@ivanbechevmrf ivanbechevmrf changed the title AmpIframe does not support height and width attributes. AmpIframe does not support height and width attributes. Oct 2, 2020
@ivanbechevmrf ivanbechevmrf changed the title AmpIframe does not support height and width attributes. AmpIframe does not support height and width and layout attributes. Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant