-
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
ecf9c3e
commit 77565e2
Showing
9 changed files
with
104 additions
and
73 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import App from './App'; | ||
import { browserHistory } from 'react-router'; | ||
import Routes from './router'; | ||
import './index.css'; | ||
|
||
ReactDOM.render( | ||
<App />, | ||
<Routes history={browserHistory}/>, | ||
document.getElementById('root') | ||
); |
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,38 @@ | ||
import React, { Component } from 'react'; | ||
import logo from './logo.svg'; | ||
import './App.css'; | ||
import ReactImageMagnify from '../../../dist/ReactImageMagnify'; | ||
|
||
class App extends Component { | ||
render() { | ||
return ( | ||
<div className="App"> | ||
<div className="App-header"> | ||
<img src={logo} className="App-logo" alt="logo" /> | ||
<h2>React Image Magnify</h2> | ||
</div> | ||
<div className="App-body"> | ||
<p className="App-intro"> | ||
Roll over image to enlarge. | ||
</p> | ||
<ReactImageMagnify {...{ | ||
largeImage: { | ||
alt: 'hello large image', | ||
src: 'https://goo.gl/Bi9OCm', | ||
width: 1200, | ||
height: 672 | ||
}, | ||
smallImage: { | ||
alt: 'hello small image', | ||
src: 'https://goo.gl/Bi9OCm', | ||
width: 300, | ||
height: 168 | ||
} | ||
}} /> | ||
</div> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default App; |
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,42 @@ | ||
import React, { Component } from 'react'; | ||
import logo from './logo.svg'; | ||
import './App.css'; | ||
import ReactImageMagnifyTouch from '../../../dist/ReactImageMagnifyTouch'; | ||
|
||
class App extends Component { | ||
render() { | ||
return ( | ||
<div className="App"> | ||
<div className="App-header"> | ||
<img src={logo} className="App-logo" alt="logo" /> | ||
<h2>React Image Magnify</h2> | ||
</div> | ||
<div className="App-body"> | ||
<p className="App-intro">Press (long touch) image to magnify. Pan (drag) to traverse image.</p> | ||
<p style={{display: 'none'}} className="App-intro">Note the page can be scrolled when touch begins on image.</p> | ||
<ReactImageMagnifyTouch {...{ | ||
enlargedImageContainerStyle: { | ||
left: '0px', | ||
border: 'none', | ||
margin: '0px' | ||
}, | ||
largeImage: { | ||
alt: 'hello large image', | ||
src: 'https://goo.gl/Bi9OCm', | ||
width: 1200, | ||
height: 672 | ||
}, | ||
smallImage: { | ||
alt: 'hello small image', | ||
src: 'https://goo.gl/Bi9OCm', | ||
width: 300, | ||
height: 168 | ||
} | ||
}} /> | ||
</div> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default App; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import React from 'react'; | ||
import { Router, Route } from 'react-router'; | ||
|
||
import App from './pages/App'; | ||
import Touch from './pages/Touch'; | ||
|
||
const Routes = (props) => ( | ||
<Router {...props}> | ||
<Route path="/" component={App} /> | ||
<Route path="/touch" component={Touch} /> | ||
</Router> | ||
); | ||
|
||
export default Routes; |