import{j as n}from"./index-bIIEL2MP.js";import{useMDXComponents as i}from"./index-CO-0pc0F.js";import{M as a,C as t}from"./index-Z-6k0Xrj.js";import{P as r,D as c,A as l}from"./PhotoPack.stories-BdYLyS8k.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./iframe-CzjIX-qr.js";import"./index-aQYXhgXp.js";import"./index-DrFu-skq.js";import"./props-b4vEeO_8.js";import"./runtime-C3rQLW--.js";import"./lifecycle-F2p_Qkk3.js";import"./create-runtime-stories-7AWWVphH.js";import"./snippet-C5kbqVpq.js";import"./svelte-component-C8Ginrj8.js";import"./get-C3XmtPLd.js";import"./each-CVpBMMjG.js";import"./attributes-Cg6aLqN3.js";import"./style-DvJ3IcV1.js";import"./size-DMdj3-I9.js";import"./Block-D3Ui8rd-.js";import"./PaddingReset-_TGvg1_B.js";import"./Markdown-DUxFwijc.js";import"./index-CX1x869l.js";function s(o){const e={blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...i(),...o.components};return n.jsxs(n.Fragment,{children:[n.jsx(a,{of:r}),` `,n.jsx(e.h1,{id:"photopack",children:"PhotoPack"}),` `,n.jsxs(e.p,{children:["The ",n.jsx(e.code,{children:"PhotoPack"})," component makes simple photo grids with custom layouts at various breakpoints."]}),` `,n.jsxs(e.p,{children:[n.jsx(e.code,{children:"images"})," are defined with their src, alt text, captions and an optional ",n.jsx(e.code,{children:"maxHeight"}),", which ensures that an image is no taller than that height in any layout."]}),` `,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-javascript",children:`const images = [ { src: 'https://...', altText: 'Alt text', caption: 'Lorem ipsum. REUTERS/Photog', // Optional max-height of images across all layouts maxHeight: 800, }, // ... ]; `})}),` `,n.jsxs(e.p,{children:[n.jsx(e.code,{children:"layouts"})," optionally define how images are laid out at different breakpoints. You can customise the layouts and group images into ",n.jsx(e.code,{children:"rows"})," above a certain ",n.jsx(e.code,{children:"breakpoint"})," by specifying the number of images that should go in that row. For example:"]}),` `,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-javascript",children:`const layouts = [ { breakpoint: 450, rows: [1, 2, 1], }, ]; `})}),` `,n.jsxs(e.p,{children:["... tells the component that when the ",n.jsx(e.code,{children:"PhotoPack"})," container is 450 pixels or wider, it should group the 4 images in 3 rows: 1 in the first, 2 in the second and 1 in the last."]}),` `,n.jsx(e.p,{children:"If you don't specify any layouts, the component will use a default responsive layout based on the number of images in your pack."}),` `,n.jsx(e.p,{children:"You can define as many layouts for as many images as you like."}),` `,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-svelte",children:`