signal-desktop/ts/components/LightboxGallery.md
Scott Nonnenberg 2988da0981 Turn on all of Microsoft's recommend lint rules
Biggest changes forced by this: alt tags for all images, resulting in
new strings added to messages.json, and a new i18n paramter/prop added
in a plot of places.

Another change of note is that there are two new tslint.json files under
ts/test and ts/styleguide to relax our rules a bit there. This required
a change to our package.json script, as manually specifying the config
file there made it ignore our tslint.json files in subdirectories
2018-05-23 16:26:47 -07:00

38 lines
944 B
Markdown

```js
const noop = () => {};
const messages = [
{
objectURL: 'https://placekitten.com/800/600',
attachments: [{ contentType: 'image/jpeg' }],
},
{
objectURL: 'https://placekitten.com/900/600',
attachments: [{ contentType: 'image/jpeg' }],
},
{
objectURL: 'foo.tif',
attachments: [{ contentType: 'image/tiff' }],
},
{
objectURL: 'https://placekitten.com/980/800',
attachments: [{ contentType: 'image/jpeg' }],
},
{
objectURL: 'https://placekitten.com/656/540',
attachments: [{ contentType: 'image/jpeg' }],
},
{
objectURL: 'https://placekitten.com/762/400',
attachments: [{ contentType: 'image/jpeg' }],
},
{
objectURL: 'https://placekitten.com/920/620',
attachments: [{ contentType: 'image/jpeg' }],
},
];
<div style={{ position: 'relative', width: '100%', height: 500 }}>
<LightboxGallery messages={messages} onSave={noop} i18n={util.i18n} />
</div>;
```