[go: nahoru, domu]

Skip to content

Commit

Permalink
Fix code climate checks
Browse files Browse the repository at this point in the history
  • Loading branch information
zesik committed Feb 9, 2019
1 parent c915bc3 commit 3e4a52d
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 25 deletions.
26 changes: 16 additions & 10 deletions example/javascripts/components/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@ import React from 'react';
import PropTypes from 'prop-types';
import NavLink from './NavLink';

function constructLinks() {
return (
<ul className="navigation">
<li><NavLink to="/standard-horizontal">Standard Horizontal</NavLink></li>
<li><NavLink to="/standard-vertical">Standard Vertical</NavLink></li>
<li><NavLink to="/minimal-size">Pane Minimal Size</NavLink></li>
<li><NavLink to="/percentage">Width in Percentage</NavLink></li>
<li><NavLink to="/nested">Nested Layout</NavLink></li>
<li><NavLink to="/sidebar">Sidebar</NavLink></li>
<li><NavLink to="/events">Events</NavLink></li>
<li><NavLink to="/iframe">iframe</NavLink></li>
</ul>
);
}

function App(props) {
return (
<div>
Expand All @@ -11,16 +26,7 @@ function App(props) {
</header>
<div className="main">
<nav className="navigation-bar">
<ul className="navigation">
<li><NavLink to="/standard-horizontal">Standard Horizontal</NavLink></li>
<li><NavLink to="/standard-vertical">Standard Vertical</NavLink></li>
<li><NavLink to="/minimal-size">Pane Minimal Size</NavLink></li>
<li><NavLink to="/percentage">Width in Percentage</NavLink></li>
<li><NavLink to="/nested">Nested Layout</NavLink></li>
<li><NavLink to="/sidebar">Sidebar</NavLink></li>
<li><NavLink to="/events">Events</NavLink></li>
<li><NavLink to="/iframe">iframe</NavLink></li>
</ul>
{constructLinks()}
</nav>
<div className="child-content">
{props.children}
Expand Down
38 changes: 23 additions & 15 deletions example/javascripts/components/HorizontalLayoutWithIFrame.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,7 @@ export default class HorizontalLayoutWithIFrame extends React.Component {
The 2nd pane on the right contains an <code>iframe</code> from <code>https://example.com</code>.
A simple hack is used so that dragging is not interfered.
</p>
<p>Refer to the following pages for details:</p>
<ul>
<li>
<a
href="https://github.com/zesik/react-splitter-layout/blob/master/example/javascripts/components/HorizontalLayoutWithIFrame.jsx"
>
Source code of this page
</a>
</li>
<li>
<a href="https://github.com/zesik/react-splitter-layout/issues/7">
Another way
</a>
</li>
</ul>
{this.renderDetailLinks()}
</div>
<div className="my-iframe">
{this.state.dragging && <div className="my-iframe-overlay" />}
Expand All @@ -52,4 +38,26 @@ export default class HorizontalLayoutWithIFrame extends React.Component {
</SplitterLayout>
);
}

renderDetailLinks() {
return (
<p>
Refer to the following pages for details:
<ul>
<li>
<a
href="https://github.com/zesik/react-splitter-layout/blob/master/example/javascripts/components/HorizontalLayoutWithIFrame.jsx"
>
Source code of this page
</a>
</li>
<li>
<a href="https://github.com/zesik/react-splitter-layout/issues/7">
Another way
</a>
</li>
</ul>
</p>
);
}
}

0 comments on commit 3e4a52d

Please sign in to comment.