Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds inline-scroll on props-table #1131

Merged
merged 7 commits into from
Sep 11, 2018
7 changes: 6 additions & 1 deletion src/rsg-components/ReactComponent/ReactComponentRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ const styles = ({ color, fontSize, space }) => ({
tabButtons: {
marginBottom: space[2],
},
tabBody: {
overflowX: 'auto',
maxWidth: '100%',
'-webkit-overflow-scrolling': 'touch',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will WebkitOverflowScrolling work too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, yes. :-) However it is the same as here:

'-webkit-overflow-scrolling': 'touch',
- but I am not super into styled-components, so I don't really know what's the intended way to do it. Btw.: Thanks for your great work on it so far!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both should work the same way, camelCased one is just more idiomatic, because all other attributes are camelCased.

It's JSS, not styled-components by the way ;-)

},
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