Skip to content

Commit

Permalink
Example: Constrain PointerFluid to 960px
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanselzer committed Apr 14, 2017
1 parent 0605469 commit 4c18b12
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 18 deletions.
5 changes: 5 additions & 0 deletions example/src/pages/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ body {
font-family: Arial;
}

.layout {
max-width: 960px;
margin: 0 auto;
}

.pointer {
width: 300px;
margin: 20px 0 0 20px;
Expand Down
38 changes: 20 additions & 18 deletions example/src/pages/PointerFluid.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,27 @@ export default class extends Component {

render() {
return (
<div className="pointer-fluid">
<div className="pointer-fluid__instructions">
Hover image to magnify
<div className="layout">
<div className="pointer-fluid">
<div className="pointer-fluid__instructions">
Hover image to magnify
</div>
<ReactImageMagnify {...{
largeImage: {
alt: '',
src: watchImg1200,
width: 1200,
height: 1800
},
smallImage: {
alt: 'Wristwatch by Ted Baker London',
isFluidWidth: true,
src: watchImg1200,
srcSet: this.srcSet,
sizes: '30vw'
}
}} />
</div>
<ReactImageMagnify {...{
largeImage: {
alt: '',
src: watchImg1200,
width: 1200,
height: 1800
},
smallImage: {
alt: 'Wristwatch by Ted Baker London',
isFluidWidth: true,
src: watchImg1200,
srcSet: this.srcSet,
sizes: '30vw'
}
}} />
</div>
);
}
Expand Down

0 comments on commit 4c18b12

Please sign in to comment.