-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
adaptive/source/tree.ts only exports one method which is makePictureTree()
Line 321 in 2863db3
| export const makePictureTree = (handle?: FileHandle, opts?: PictureOptions): Picture => { |
However, README references a picture() method. I haven't delved too much into this so excuse my poor usage of the utility as far as options go but it appears I can do:
<GridList cellHeight={160} cols={3}>
{hits
.filter(hit => !hit.filename.toLowerCase().includes('heic'))
.map(tile => {
const options = {
sizes: { fallback: '20vw' },
resolutions: [540, 1080]
};
const tree = makePictureTree(tile.objectID, options);
console.log(tree);
const renderImage = imageObj => <img alt={tile.filename} {...imageObj} />;
return (
<GridListTile key={tile.image} cols={1} style={{ minHeight: 250 }}>
<picture>{renderImage(tree.img)}</picture>
</GridListTile>
);
})}
</GridList>
Using Material UI GridList and Algolia React InstantSearch currently in a test project.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels