| 
									
										
										
										
											2020-10-30 15:34:04 -05:00
										 |  |  | // Copyright 2020 Signal Messenger, LLC
 | 
					
						
							|  |  |  | // SPDX-License-Identifier: AGPL-3.0-only
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  | import * as React from 'react'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import { action } from '@storybook/addon-actions'; | 
					
						
							|  |  |  | import { boolean, number } from '@storybook/addon-knobs'; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-10-26 14:15:33 -05:00
										 |  |  | import type { Props } from './ImageGrid'; | 
					
						
							|  |  |  | import { ImageGrid } from './ImageGrid'; | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  | import { | 
					
						
							|  |  |  |   AUDIO_MP3, | 
					
						
							|  |  |  |   IMAGE_JPEG, | 
					
						
							|  |  |  |   IMAGE_PNG, | 
					
						
							|  |  |  |   IMAGE_WEBP, | 
					
						
							|  |  |  |   VIDEO_MP4, | 
					
						
							| 
									
										
										
										
											2021-08-09 16:06:21 -04:00
										 |  |  |   stringToMIMEType, | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  | } from '../../types/MIME'; | 
					
						
							| 
									
										
										
										
											2021-09-17 20:30:08 -04:00
										 |  |  | import { setupI18n } from '../../util/setupI18n'; | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  | import enMessages from '../../../_locales/en/messages.json'; | 
					
						
							|  |  |  | import { pngUrl, squareStickerUrl } from '../../storybook/Fixtures'; | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  | import { fakeAttachment } from '../../test-both/helpers/fakeAttachment'; | 
					
						
							| 
									
										
										
										
											2020-09-14 12:51:27 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  | const i18n = setupI18n('en', enMessages); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-06-06 20:48:02 -04:00
										 |  |  | export default { | 
					
						
							|  |  |  |   title: 'Components/Conversation/ImageGrid', | 
					
						
							|  |  |  | }; | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | const createProps = (overrideProps: Partial<Props> = {}): Props => ({ | 
					
						
							|  |  |  |   attachments: overrideProps.attachments || [ | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |     fakeAttachment({ | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |       contentType: IMAGE_PNG, | 
					
						
							|  |  |  |       fileName: 'sax.png', | 
					
						
							|  |  |  |       height: 1200, | 
					
						
							|  |  |  |       url: pngUrl, | 
					
						
							|  |  |  |       width: 800, | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |     }), | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |   ], | 
					
						
							|  |  |  |   bottomOverlay: boolean('bottomOverlay', overrideProps.bottomOverlay || false), | 
					
						
							| 
									
										
										
										
											2022-04-27 16:03:50 -07:00
										 |  |  |   direction: overrideProps.direction || 'incoming', | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |   i18n, | 
					
						
							|  |  |  |   isSticker: boolean('isSticker', overrideProps.isSticker || false), | 
					
						
							|  |  |  |   onClick: action('onClick'), | 
					
						
							|  |  |  |   onError: action('onError'), | 
					
						
							|  |  |  |   stickerSize: number('stickerSize', overrideProps.stickerSize || 0), | 
					
						
							|  |  |  |   tabIndex: number('tabIndex', overrideProps.tabIndex || 0), | 
					
						
							|  |  |  |   withContentAbove: boolean( | 
					
						
							|  |  |  |     'withContentAbove', | 
					
						
							|  |  |  |     overrideProps.withContentAbove || false | 
					
						
							|  |  |  |   ), | 
					
						
							|  |  |  |   withContentBelow: boolean( | 
					
						
							|  |  |  |     'withContentBelow', | 
					
						
							|  |  |  |     overrideProps.withContentBelow || false | 
					
						
							|  |  |  |   ), | 
					
						
							|  |  |  | }); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-11-17 16:45:19 -08:00
										 |  |  | export function OneImage(): JSX.Element { | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |   const props = createProps(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   return <ImageGrid {...props} />; | 
					
						
							| 
									
										
										
										
											2022-11-17 16:45:19 -08:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-11-17 16:45:19 -08:00
										 |  |  | export function TwoImages(): JSX.Element { | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |   const props = createProps({ | 
					
						
							|  |  |  |     attachments: [ | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       fakeAttachment({ | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |         contentType: IMAGE_PNG, | 
					
						
							|  |  |  |         fileName: 'sax.png', | 
					
						
							|  |  |  |         height: 1200, | 
					
						
							|  |  |  |         url: pngUrl, | 
					
						
							|  |  |  |         width: 800, | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       }), | 
					
						
							|  |  |  |       fakeAttachment({ | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |         contentType: IMAGE_JPEG, | 
					
						
							|  |  |  |         fileName: 'tina-rolf-269345-unsplash.jpg', | 
					
						
							|  |  |  |         height: 1680, | 
					
						
							|  |  |  |         url: '/fixtures/tina-rolf-269345-unsplash.jpg', | 
					
						
							|  |  |  |         width: 3000, | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       }), | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |     ], | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   return <ImageGrid {...props} />; | 
					
						
							| 
									
										
										
										
											2022-11-17 16:45:19 -08:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-11-17 16:45:19 -08:00
										 |  |  | export function ThreeImages(): JSX.Element { | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |   const props = createProps({ | 
					
						
							|  |  |  |     attachments: [ | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       fakeAttachment({ | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |         contentType: IMAGE_PNG, | 
					
						
							|  |  |  |         fileName: 'sax.png', | 
					
						
							|  |  |  |         height: 1200, | 
					
						
							|  |  |  |         url: pngUrl, | 
					
						
							|  |  |  |         width: 800, | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       }), | 
					
						
							|  |  |  |       fakeAttachment({ | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |         contentType: IMAGE_JPEG, | 
					
						
							|  |  |  |         fileName: 'tina-rolf-269345-unsplash.jpg', | 
					
						
							|  |  |  |         height: 1680, | 
					
						
							|  |  |  |         url: '/fixtures/tina-rolf-269345-unsplash.jpg', | 
					
						
							|  |  |  |         width: 3000, | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       }), | 
					
						
							|  |  |  |       fakeAttachment({ | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |         contentType: IMAGE_PNG, | 
					
						
							|  |  |  |         fileName: 'sax.png', | 
					
						
							|  |  |  |         height: 1200, | 
					
						
							|  |  |  |         url: pngUrl, | 
					
						
							|  |  |  |         width: 800, | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       }), | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |     ], | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   return <ImageGrid {...props} />; | 
					
						
							| 
									
										
										
										
											2022-11-17 16:45:19 -08:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-11-17 16:45:19 -08:00
										 |  |  | export function FourImages(): JSX.Element { | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |   const props = createProps({ | 
					
						
							|  |  |  |     attachments: [ | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       fakeAttachment({ | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |         contentType: IMAGE_PNG, | 
					
						
							|  |  |  |         fileName: 'sax.png', | 
					
						
							|  |  |  |         height: 1200, | 
					
						
							|  |  |  |         url: pngUrl, | 
					
						
							|  |  |  |         width: 800, | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       }), | 
					
						
							|  |  |  |       fakeAttachment({ | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |         contentType: IMAGE_JPEG, | 
					
						
							|  |  |  |         fileName: 'tina-rolf-269345-unsplash.jpg', | 
					
						
							|  |  |  |         height: 1680, | 
					
						
							|  |  |  |         url: '/fixtures/tina-rolf-269345-unsplash.jpg', | 
					
						
							|  |  |  |         width: 3000, | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       }), | 
					
						
							|  |  |  |       fakeAttachment({ | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |         contentType: IMAGE_PNG, | 
					
						
							|  |  |  |         fileName: 'sax.png', | 
					
						
							|  |  |  |         height: 1200, | 
					
						
							|  |  |  |         url: pngUrl, | 
					
						
							|  |  |  |         width: 800, | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       }), | 
					
						
							|  |  |  |       fakeAttachment({ | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |         contentType: IMAGE_JPEG, | 
					
						
							|  |  |  |         fileName: 'tina-rolf-269345-unsplash.jpg', | 
					
						
							|  |  |  |         height: 1680, | 
					
						
							|  |  |  |         url: '/fixtures/tina-rolf-269345-unsplash.jpg', | 
					
						
							|  |  |  |         width: 3000, | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       }), | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |     ], | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   return <ImageGrid {...props} />; | 
					
						
							| 
									
										
										
										
											2022-11-17 16:45:19 -08:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-11-17 16:45:19 -08:00
										 |  |  | export function FiveImages(): JSX.Element { | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |   const props = createProps({ | 
					
						
							|  |  |  |     attachments: [ | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       fakeAttachment({ | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |         contentType: IMAGE_PNG, | 
					
						
							|  |  |  |         fileName: 'sax.png', | 
					
						
							|  |  |  |         height: 1200, | 
					
						
							|  |  |  |         url: pngUrl, | 
					
						
							|  |  |  |         width: 800, | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       }), | 
					
						
							|  |  |  |       fakeAttachment({ | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |         contentType: IMAGE_JPEG, | 
					
						
							|  |  |  |         fileName: 'tina-rolf-269345-unsplash.jpg', | 
					
						
							|  |  |  |         height: 1680, | 
					
						
							|  |  |  |         url: '/fixtures/tina-rolf-269345-unsplash.jpg', | 
					
						
							|  |  |  |         width: 3000, | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       }), | 
					
						
							|  |  |  |       fakeAttachment({ | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |         contentType: IMAGE_PNG, | 
					
						
							|  |  |  |         fileName: 'sax.png', | 
					
						
							|  |  |  |         height: 1200, | 
					
						
							|  |  |  |         url: pngUrl, | 
					
						
							|  |  |  |         width: 800, | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       }), | 
					
						
							|  |  |  |       fakeAttachment({ | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |         contentType: IMAGE_JPEG, | 
					
						
							|  |  |  |         fileName: 'tina-rolf-269345-unsplash.jpg', | 
					
						
							|  |  |  |         height: 1680, | 
					
						
							|  |  |  |         url: '/fixtures/tina-rolf-269345-unsplash.jpg', | 
					
						
							|  |  |  |         width: 3000, | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       }), | 
					
						
							|  |  |  |       fakeAttachment({ | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |         contentType: IMAGE_PNG, | 
					
						
							|  |  |  |         fileName: 'sax.png', | 
					
						
							|  |  |  |         height: 1200, | 
					
						
							|  |  |  |         url: pngUrl, | 
					
						
							|  |  |  |         width: 800, | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       }), | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |     ], | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   return <ImageGrid {...props} />; | 
					
						
							| 
									
										
										
										
											2022-11-17 16:45:19 -08:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-06-06 20:48:02 -04:00
										 |  |  | export const _6Images = (): JSX.Element => { | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |   const props = createProps({ | 
					
						
							|  |  |  |     attachments: [ | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       fakeAttachment({ | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |         contentType: IMAGE_PNG, | 
					
						
							|  |  |  |         fileName: 'sax.png', | 
					
						
							|  |  |  |         height: 1200, | 
					
						
							|  |  |  |         url: pngUrl, | 
					
						
							|  |  |  |         width: 800, | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       }), | 
					
						
							|  |  |  |       fakeAttachment({ | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |         contentType: IMAGE_JPEG, | 
					
						
							|  |  |  |         fileName: 'tina-rolf-269345-unsplash.jpg', | 
					
						
							|  |  |  |         height: 1680, | 
					
						
							|  |  |  |         url: '/fixtures/tina-rolf-269345-unsplash.jpg', | 
					
						
							|  |  |  |         width: 3000, | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       }), | 
					
						
							|  |  |  |       fakeAttachment({ | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |         contentType: IMAGE_PNG, | 
					
						
							|  |  |  |         fileName: 'sax.png', | 
					
						
							|  |  |  |         height: 1200, | 
					
						
							|  |  |  |         url: pngUrl, | 
					
						
							|  |  |  |         width: 800, | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       }), | 
					
						
							|  |  |  |       fakeAttachment({ | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |         contentType: IMAGE_JPEG, | 
					
						
							|  |  |  |         fileName: 'tina-rolf-269345-unsplash.jpg', | 
					
						
							|  |  |  |         height: 1680, | 
					
						
							|  |  |  |         url: '/fixtures/tina-rolf-269345-unsplash.jpg', | 
					
						
							|  |  |  |         width: 3000, | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       }), | 
					
						
							|  |  |  |       fakeAttachment({ | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |         contentType: IMAGE_PNG, | 
					
						
							|  |  |  |         fileName: 'sax.png', | 
					
						
							|  |  |  |         height: 1200, | 
					
						
							|  |  |  |         url: pngUrl, | 
					
						
							|  |  |  |         width: 800, | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       }), | 
					
						
							|  |  |  |       fakeAttachment({ | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |         contentType: IMAGE_PNG, | 
					
						
							|  |  |  |         fileName: 'sax.png', | 
					
						
							|  |  |  |         height: 1200, | 
					
						
							|  |  |  |         url: pngUrl, | 
					
						
							|  |  |  |         width: 800, | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       }), | 
					
						
							|  |  |  |       fakeAttachment({ | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |         contentType: IMAGE_PNG, | 
					
						
							|  |  |  |         fileName: 'sax.png', | 
					
						
							|  |  |  |         height: 1200, | 
					
						
							|  |  |  |         url: pngUrl, | 
					
						
							|  |  |  |         width: 800, | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       }), | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |     ], | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   return <ImageGrid {...props} />; | 
					
						
							| 
									
										
										
										
											2022-06-06 20:48:02 -04:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | _6Images.story = { | 
					
						
							|  |  |  |   name: '6+ Images', | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-11-17 16:45:19 -08:00
										 |  |  | export function MixedContentTypes(): JSX.Element { | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |   const props = createProps({ | 
					
						
							|  |  |  |     attachments: [ | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       fakeAttachment({ | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |         contentType: VIDEO_MP4, | 
					
						
							|  |  |  |         fileName: 'pixabay-Soap-Bubble-7141.mp4', | 
					
						
							|  |  |  |         height: 112, | 
					
						
							|  |  |  |         screenshot: { | 
					
						
							|  |  |  |           height: 112, | 
					
						
							|  |  |  |           width: 112, | 
					
						
							|  |  |  |           url: '/fixtures/kitten-4-112-112.jpg', | 
					
						
							|  |  |  |           contentType: IMAGE_JPEG, | 
					
						
							| 
									
										
										
										
											2021-06-17 10:15:10 -07:00
										 |  |  |           path: 'originalpath', | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |         }, | 
					
						
							|  |  |  |         url: '/fixtures/pixabay-Soap-Bubble-7141.mp4', | 
					
						
							|  |  |  |         width: 112, | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       }), | 
					
						
							|  |  |  |       fakeAttachment({ | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |         contentType: IMAGE_PNG, | 
					
						
							|  |  |  |         fileName: 'sax.png', | 
					
						
							|  |  |  |         height: 1200, | 
					
						
							|  |  |  |         url: pngUrl, | 
					
						
							|  |  |  |         width: 800, | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       }), | 
					
						
							|  |  |  |       fakeAttachment({ | 
					
						
							| 
									
										
										
										
											2021-08-09 16:06:21 -04:00
										 |  |  |         contentType: stringToMIMEType('text/plain'), | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |         fileName: 'lorem-ipsum.txt', | 
					
						
							|  |  |  |         url: '/fixtures/lorem-ipsum.txt', | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       }), | 
					
						
							|  |  |  |       fakeAttachment({ | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |         contentType: AUDIO_MP3, | 
					
						
							|  |  |  |         fileName: 'incompetech-com-Agnus-Dei-X.mp3', | 
					
						
							|  |  |  |         url: '/fixtures/incompetech-com-Agnus-Dei-X.mp3', | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       }), | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |     ], | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   return <ImageGrid {...props} />; | 
					
						
							| 
									
										
										
										
											2022-11-17 16:45:19 -08:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-11-17 16:45:19 -08:00
										 |  |  | export function Sticker(): JSX.Element { | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |   const props = createProps({ | 
					
						
							|  |  |  |     attachments: [ | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       fakeAttachment({ | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |         contentType: IMAGE_WEBP, | 
					
						
							|  |  |  |         fileName: 'sticker.webp', | 
					
						
							|  |  |  |         height: 512, | 
					
						
							|  |  |  |         url: squareStickerUrl, | 
					
						
							|  |  |  |         width: 512, | 
					
						
							| 
									
										
										
										
											2021-10-05 15:10:08 -07:00
										 |  |  |       }), | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |     ], | 
					
						
							|  |  |  |     isSticker: true, | 
					
						
							|  |  |  |     stickerSize: 128, | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   return <ImageGrid {...props} />; | 
					
						
							| 
									
										
										
										
											2022-11-17 16:45:19 -08:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-11-17 16:45:19 -08:00
										 |  |  | export function ContentAboveAndBelow(): JSX.Element { | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |   const props = createProps({ | 
					
						
							|  |  |  |     withContentAbove: true, | 
					
						
							|  |  |  |     withContentBelow: true, | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   return <ImageGrid {...props} />; | 
					
						
							| 
									
										
										
										
											2022-11-17 16:45:19 -08:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2022-06-06 20:48:02 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | ContentAboveAndBelow.story = { | 
					
						
							|  |  |  |   name: 'Content Above and Below', | 
					
						
							|  |  |  | }; | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-11-17 16:45:19 -08:00
										 |  |  | export function BottomOverlay(): JSX.Element { | 
					
						
							| 
									
										
										
										
											2020-08-26 11:32:24 -07:00
										 |  |  |   const props = createProps({ | 
					
						
							|  |  |  |     bottomOverlay: true, | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   return <ImageGrid {...props} />; | 
					
						
							| 
									
										
										
										
											2022-11-17 16:45:19 -08:00
										 |  |  | } |