mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
These tests are copy/pasta from existing tests - from `test/integration/next-image-new/default` - to `test/integration/next-image-new/app-dir` There were a handful of changes need to migrate the fixture from `pages` to `app` but the test assertions are the same. There is one test assertion for preload that wasn't working so its marked as "skip" until it can be fixed in a future PR. fix NEXT-849 ([link](https://linear.app/vercel/issue/NEXT-849))
36 lines
733 B
JavaScript
36 lines
733 B
JavaScript
import React from 'react'
|
|
import Image from 'next/image'
|
|
|
|
const Page = () => {
|
|
return (
|
|
<div>
|
|
<h1>Style prop usage and warnings</h1>
|
|
<Image
|
|
id="with-styles"
|
|
src="/test.png"
|
|
width={400}
|
|
height={400}
|
|
style={{ borderRadius: '10px', padding: 10 }}
|
|
loading="eager"
|
|
/>
|
|
<Image
|
|
id="with-overlapping-styles"
|
|
src="/test.jpg"
|
|
width={400}
|
|
height={400}
|
|
style={{ width: '10px', borderRadius: '10px', margin: '15px' }}
|
|
loading="eager"
|
|
/>
|
|
<Image
|
|
id="without-styles"
|
|
src="/test.webp"
|
|
width={400}
|
|
height={400}
|
|
loading="eager"
|
|
/>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default Page
|