Skip to content

Commit

Permalink
Fix: Add inline-scroll on props table (#1131)
Browse files Browse the repository at this point in the history
  • Loading branch information
derz authored and sapegin committed Sep 11, 2018
1 parent a7a6cf4 commit 5263b27
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/rsg-components/ReactComponent/ReactComponentRenderer.js
Expand Up @@ -16,6 +16,11 @@ const styles = ({ color, fontSize, space }) => ({
tabButtons: {
marginBottom: space[2],
},
tabBody: {
overflowX: 'auto',
maxWidth: '100%',
WebkitOverflowScrolling: 'touch',
},
docs: {
color: color.base,
fontSize: fontSize.text,
Expand Down Expand Up @@ -48,7 +53,7 @@ export function ReactComponentRenderer({
{tabButtons && (
<div className={classes.tabs}>
<div className={classes.tabButtons}>{tabButtons}</div>
{tabBody}
<div className={classes.tabBody}>{tabBody}</div>
</div>
)}
{examples}
Expand Down
Expand Up @@ -316,7 +316,9 @@ exports[`ReactComponentRenderer should render usage section 1`] = `
</div>
</div>
<div>
tab body
<div>
tab body
</div>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/rsg-components/StyleGuide/StyleGuideRenderer.js
Expand Up @@ -37,7 +37,7 @@ const styles = ({ color, fontFamily, fontSize, sidebarWidth, mq, space, maxWidth
bottom: 0,
width: sidebarWidth,
overflow: 'auto',
'-webkit-overflow-scrolling': 'touch',
WebkitOverflowScrolling: 'touch',
[mq.small]: {
position: 'static',
width: 'auto',
Expand Down

0 comments on commit 5263b27

Please sign in to comment.