rsnext/test/integration/image-component/default/pages/layout-fixed.js
Steven afa04d22db
Add layout prop to Image component (#18491)
This PR introduces a new `layout` property.

This allows 3 possible values (`fixed`, `intrinsic`, or `responsive`) which solve many use cases we have seen since 10.0.0 and will hopefully avoid usage of `unsized`.

Fixes #18351 

Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-10-30 10:33:34 -04:00

41 lines
742 B
JavaScript

import React from 'react'
import Image from 'next/image'
const Page = () => {
return (
<div>
<p>Layout Fixed</p>
<Image
id="fixed1"
src="/wide.png"
width="1200"
height="700"
layout="fixed"
></Image>
<Image
id="fixed2"
src="/wide.png"
width="1200"
height="700"
layout="fixed"
></Image>
<Image
id="fixed3"
src="/wide.png"
width="1200"
height="700"
layout="fixed"
></Image>
<Image
id="fixed4"
src="/wide.png"
width="1200"
height="700"
layout="fixed"
></Image>
<p>Layout Fixed</p>
</div>
)
}
export default Page