Support multiple image sets

This commit is contained in:
2018-12-28 15:12:02 -07:00
parent 869e448dd3
commit b3820ca43b
6 changed files with 117 additions and 64 deletions

View File

@@ -0,0 +1,24 @@
import { Grid } from "./grid";
import * as Model from "../model";
import * as React from "react";
export interface Props {
imageSet: Model.ImageSet;
onImageSelected: (img: Model.Image) => void;
width: number;
}
export class ImageSet extends React.PureComponent<Props, {}> {
static displayName = "ImageSet";
render() {
return <div className="ImageSet">
<h2>{ this.props.imageSet.location } · { this.props.imageSet.description }</h2>
<Grid
images={ this.props.imageSet.images}
onImageSelected={ this.props.onImageSelected }
width={ this.props.width } />
</div>;
}
}