big picture

This commit is contained in:
2018-12-27 16:55:40 -08:00
parent 9c052aebd2
commit c4704a920b
5 changed files with 114 additions and 13 deletions

View File

@@ -6,7 +6,6 @@ export interface Props {
src: string;
image: Model.Image;
onClick: () => void;
selected?: boolean;
width: number;
}
@@ -16,11 +15,10 @@ export class Picture extends React.PureComponent<Props, {}> {
render() {
const src = `img/600/${this.props.src}`;
return <img
className={ this.props.selected ? "Picture-selected" : ""}
onClick={this.props.onClick}
srcSet={this._srcset()}
src={src}
width={ this.props.selected ? "100%" : this.props.width + "px" }
width={ this.props.width + "px" }
/>;
}