Skip to content

Commit 5263b27

Browse files
derzsapegin
authored andcommittedSep 11, 2018
Fix: Add inline-scroll on props table (#1131)
1 parent a7a6cf4 commit 5263b27

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed
 

‎src/rsg-components/ReactComponent/ReactComponentRenderer.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ const styles = ({ color, fontSize, space }) => ({
1616
tabButtons: {
1717
marginBottom: space[2],
1818
},
19+
tabBody: {
20+
overflowX: 'auto',
21+
maxWidth: '100%',
22+
WebkitOverflowScrolling: 'touch',
23+
},
1924
docs: {
2025
color: color.base,
2126
fontSize: fontSize.text,
@@ -48,7 +53,7 @@ export function ReactComponentRenderer({
4853
{tabButtons && (
4954
<div className={classes.tabs}>
5055
<div className={classes.tabButtons}>{tabButtons}</div>
51-
{tabBody}
56+
<div className={classes.tabBody}>{tabBody}</div>
5257
</div>
5358
)}
5459
{examples}

‎src/rsg-components/ReactComponent/__snapshots__/ReactComponent.spec.js.snap

+3-1
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,9 @@ exports[`ReactComponentRenderer should render usage section 1`] = `
316316
</div>
317317
</div>
318318
<div>
319-
tab body
319+
<div>
320+
tab body
321+
</div>
320322
</div>
321323
</div>
322324
</div>

‎src/rsg-components/StyleGuide/StyleGuideRenderer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const styles = ({ color, fontFamily, fontSize, sidebarWidth, mq, space, maxWidth
3737
bottom: 0,
3838
width: sidebarWidth,
3939
overflow: 'auto',
40-
'-webkit-overflow-scrolling': 'touch',
40+
WebkitOverflowScrolling: 'touch',
4141
[mq.small]: {
4242
position: 'static',
4343
width: 'auto',

0 commit comments

Comments
 (0)
Please sign in to comment.