2018-05-08 01:20:39 +00:00
|
|
|
## Image (supported format)
|
|
|
|
|
2018-04-15 04:27:30 +00:00
|
|
|
```js
|
2018-04-24 20:12:07 +00:00
|
|
|
const noop = () => {};
|
|
|
|
|
2018-05-01 22:37:21 +00:00
|
|
|
<div style={{ position: 'relative', width: '100%', height: 500 }}>
|
2018-04-15 06:28:14 +00:00
|
|
|
<Lightbox
|
2018-04-25 22:15:57 +00:00
|
|
|
objectURL="https://placekitten.com/800/600"
|
|
|
|
contentType="image/jpeg"
|
2018-04-24 20:12:07 +00:00
|
|
|
onSave={noop}
|
2018-05-22 19:31:43 +00:00
|
|
|
i18n={util.i18n}
|
2018-04-15 06:28:14 +00:00
|
|
|
/>
|
2018-05-01 22:37:21 +00:00
|
|
|
</div>;
|
2018-04-15 04:27:30 +00:00
|
|
|
```
|
2018-05-08 01:20:39 +00:00
|
|
|
|
|
|
|
## Image (unsupported format)
|
|
|
|
|
|
|
|
```js
|
|
|
|
const noop = () => {};
|
|
|
|
|
|
|
|
<div style={{ position: 'relative', width: '100%', height: 500 }}>
|
2018-05-22 19:31:43 +00:00
|
|
|
<Lightbox
|
|
|
|
objectURL="foo.tif"
|
|
|
|
contentType="image/tiff"
|
|
|
|
onSave={noop}
|
|
|
|
i18n={util.i18n}
|
|
|
|
/>
|
2018-05-08 01:20:39 +00:00
|
|
|
</div>;
|
|
|
|
```
|
|
|
|
|
|
|
|
## Video (supported format)
|
|
|
|
|
|
|
|
```js
|
|
|
|
const noop = () => {};
|
|
|
|
|
|
|
|
<div style={{ position: 'relative', width: '100%', height: 500 }}>
|
|
|
|
<Lightbox
|
|
|
|
objectURL="fixtures/pixabay-Soap-Bubble-7141.mp4"
|
|
|
|
contentType="video/mp4"
|
|
|
|
onSave={noop}
|
2018-05-22 19:31:43 +00:00
|
|
|
i18n={util.i18n}
|
2018-05-08 01:20:39 +00:00
|
|
|
/>
|
|
|
|
</div>;
|
|
|
|
```
|
|
|
|
|
|
|
|
## Video (unsupported format)
|
|
|
|
|
|
|
|
```js
|
|
|
|
const noop = () => {};
|
|
|
|
|
|
|
|
<div style={{ position: 'relative', width: '100%', height: 500 }}>
|
2018-05-22 19:31:43 +00:00
|
|
|
<Lightbox
|
|
|
|
objectURL="foo.mov"
|
|
|
|
contentType="video/quicktime"
|
|
|
|
onSave={noop}
|
|
|
|
i18n={util.i18n}
|
|
|
|
/>
|
2018-05-08 01:20:39 +00:00
|
|
|
</div>;
|
|
|
|
```
|
|
|
|
|
|
|
|
## Unsupported file format
|
|
|
|
|
|
|
|
```js
|
|
|
|
const noop = () => {};
|
|
|
|
|
|
|
|
<div style={{ position: 'relative', width: '100%', height: 600 }}>
|
|
|
|
<Lightbox
|
|
|
|
objectURL="tsconfig.json"
|
|
|
|
contentType="application/json"
|
|
|
|
onSave={noop}
|
2018-05-22 19:31:43 +00:00
|
|
|
i18n={util.i18n}
|
2018-05-08 01:20:39 +00:00
|
|
|
/>
|
|
|
|
</div>;
|
|
|
|
```
|