Yoast / yoast-components

Accessible React components by Yoast
GNU General Public License v3.0
21 stars 6 forks source link

Invalid `width` HTML attribute rendered in the snippet preview container #796

Open afercia opened 5 years ago

afercia commented 5 years ago

The snippet preview container has a width prop that gets rendered as a HTML attribute, producing invalid HTML Error: Attribute width not allowed on element div at this point.

https://github.com/Yoast/yoast-components/blob/9019e643a7b642a0ac5c4f32e5595e7ee2800612/composites/Plugin/SnippetPreview/components/SnippetPreview.js#L642-L646

This prop gets then passed down to the desktop and mobile inner components. While it's a very minor thing, it would be great to not use prop names that match HTML attributes. Renaming it to something else would be enough to fix it.

screenshot 2018-12-14 at 10 31 53