-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ba242dd
commit 80325b9
Showing
20 changed files
with
518 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import React, { Component } from 'react'; | ||
import ReactImageMagnify from '../pkg-lnk/ReactImageMagnify'; | ||
import SpacedSpan from '../components/SpacedSpan'; | ||
|
||
import '../styles/examples.css'; | ||
|
||
import watchImg687 from '../images/wristwatch_687.jpg'; | ||
import watchImg1200 from '../images/wristwatch_1200.jpg'; | ||
|
||
export default class BasicExample extends Component { | ||
render() { | ||
return ( | ||
<div className="fluid"> | ||
<div className="fluid__image-container"> | ||
<ReactImageMagnify {...{ | ||
smallImage: { | ||
alt: 'Wristwatch by Ted Baker London', | ||
isFluidWidth: true, | ||
src: watchImg687, | ||
}, | ||
largeImage: { | ||
src: watchImg1200, | ||
width: 1200, | ||
height: 1800 | ||
}, | ||
shouldUsePositiveSpaceLens: true | ||
}} /> | ||
</div> | ||
<div className="fluid__instructions"> | ||
<h3>Alternate Lens</h3> | ||
<p> | ||
Specify a positive space design | ||
in place of the default negative space design. | ||
</p> | ||
<p> | ||
Optionally override the default appearance by specifying a custom style, for example: | ||
</p> | ||
<pre> | ||
lensStyle: {<br /> | ||
background: 'hsla(0, 0%, 100%, .3)',<br /> | ||
border: '1px solid #ccc'<br /> | ||
} | ||
</pre> | ||
<p> | ||
Support for a custom lens is provided by | ||
the <span className="code">lensComponent</span> prop. | ||
</p> | ||
<p> | ||
Please see | ||
<SpacedSpan> | ||
<a href="https://github.com/ethanselzer/react-image-magnify/blob/master/example/src/components/Lens.js"> | ||
source code | ||
</a> | ||
</SpacedSpan> | ||
for details. | ||
</p> | ||
</div> | ||
<div style={{height: '500px'}} /> | ||
</div> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React, { Component } from 'react'; | ||
import { | ||
Col, | ||
Grid, | ||
Jumbotron, | ||
Row | ||
} from 'react-bootstrap'; | ||
import Helmet from 'react-helmet'; | ||
|
||
import Header from '../components/Header'; | ||
import Lens from '../components/Lens'; | ||
|
||
import 'bootstrap/dist/css/bootstrap.css'; | ||
import '../styles/app.css'; | ||
|
||
export default class extends Component { | ||
render() { | ||
return ( | ||
<div> | ||
<Helmet title="Image Magnify | React Cursor Position" /> | ||
<Header {...this.props}/> | ||
<Jumbotron> | ||
<Grid> | ||
<Row> | ||
<Col sm={12}> | ||
</Col> | ||
</Row> | ||
</Grid> | ||
</Jumbotron> | ||
<Grid> | ||
<Row> | ||
<Col sm={12}> | ||
<Lens /> | ||
</Col> | ||
</Row> | ||
</Grid> | ||
</div> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.