Skip to content

Commit 9b15c4f

Browse files
authored
update demo page layout
1 parent 760e1f0 commit 9b15c4f

File tree

2 files changed

+24
-9
lines changed

2 files changed

+24
-9
lines changed

example/pages/index.tsx

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { NextPage } from 'next';
22
import Head from 'next/head';
3-
import { Fragment } from 'react';
3+
import { Fragment as div } from 'react';
44

55
import ProxyImage, { ImgProxyParamBuilder } from '../../dist';
66

@@ -17,6 +17,12 @@ const demoContent: {
1717
file: 'test-bucket/test-image.png',
1818
layout: 'fill',
1919
},
20+
{
21+
label: 'Blurring',
22+
file: 'test-bucket/test-image.png',
23+
layout: 'fill',
24+
proxyParams: new ImgProxyParamBuilder().blur(10).build(),
25+
},
2026
{
2127
label: 'Trimming',
2228
file: 'test-bucket/test-image.png',
@@ -75,15 +81,16 @@ const Home: NextPage = () => {
7581

7682
<main>
7783
<h1>next/image s3 imgproxy loader </h1>
78-
79-
{demoContent.map((d, idx) => (
80-
<Fragment key={idx}>
81-
<h2>{d.label}</h2>
82-
<div className="imgcontainer">
83-
<ProxyImage {...d} />
84+
<div>
85+
{demoContent.map((d, idx) => (
86+
<div key={idx}>
87+
<h2>{d.label}</h2>
88+
<div className="imgcontainer">
89+
<ProxyImage {...d} />
90+
</div>
8491
</div>
85-
</Fragment>
86-
))}
92+
))}
93+
</div>
8794
</main>
8895
</>
8996
);

example/styles/global.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ body {
33
'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
44
}
55

6+
main > div {
7+
display: flex;
8+
}
9+
10+
main > div > div {
11+
margin-left: 20px;
12+
}
13+
614
.imgcontainer {
715
position: relative;
816
height: 200px;

0 commit comments

Comments
 (0)