117 |
118 | {_.map( _.times(this.props.children.length, Number), (i) => {
119 | return(
120 | -
121 |
123 |
124 |
125 | )
126 | })}
127 |
128 |
129 |
131 | {({x}) =>
132 |
149 | {this.props.children}
150 |
151 | }
152 |
153 |
154 | );
155 | },
156 | });
157 |
158 | export default ScrollContainer;
159 |
--------------------------------------------------------------------------------
/src/ScrollSection.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | const ScrollSection = React.createClass({
4 | render() {
5 | let pageId = this.props.pageId;
6 |
7 | let onepageStyle = {
8 | position: 'absolute',
9 | top: `${pageId * 100}%`,
10 | width: '100%',
11 | height: '100%',
12 | borderRadius: '4px',
13 | };
14 |
15 | let style = Object.assign({}, onepageStyle, this.props.style)
16 | return (
17 |