Skip to content

Commit

Permalink
used isMobile and showChapters to calculate padding
Browse files Browse the repository at this point in the history
  • Loading branch information
tima101 committed Feb 19, 2018
1 parent 98f9331 commit f99e747
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pages/public/read-chapter.js
Expand Up @@ -176,9 +176,16 @@ class ReadChapter extends React.Component {
showChapters,
} = this.state;

let padding = '20px 20%';
if (!isMobile && showChapters) {
padding = '20px 10%';
} else if (isMobile) {
padding = '0px 10px';
}

return (
<div
style={{ padding: '0px 8% 20px 6%' }}
style={{ padding }}
ref={(c) => {
this.mainContent = c;
}}
Expand Down

0 comments on commit f99e747

Please sign in to comment.