Skip to content

Commit

Permalink
Make left panel stories scrollable (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamieholliday authored and arunoda committed May 10, 2016
1 parent 08af02e commit d8947c1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
19 changes: 10 additions & 9 deletions src/client/manager/modules/ui/components/left_panel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import TextFilter from './text_filter';
import pick from 'lodash.pick';

const scrollStyle = {
height: '100vh',
height: 'calc(100vh - 105px)',
marginTop: 10,
overflowY: 'auto',
};

Expand All @@ -16,14 +17,14 @@ const mainStyle = {
const storyProps = ['stories', 'selectedKind', 'selectedStory', 'onSelectStory'];

const LeftPanel = (props) => (
<div style={scrollStyle}>
<div style={mainStyle}>
<Header openShortcutsHelp={props.openShortcutsHelp} />
<TextFilter
text={props.storyFilter}
onClear={() => props.onStoryFilter('')}
onChange={(text) => props.onStoryFilter(text)}
/>
<div style={mainStyle}>
<Header openShortcutsHelp={props.openShortcutsHelp} />
<TextFilter
text={props.storyFilter}
onClear={() => props.onStoryFilter('')}
onChange={(text) => props.onStoryFilter(text)}
/>
<div style={scrollStyle}>
{props.stories ? (<Stories {...pick(props, storyProps)} />) : null}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react';
import { baseFonts } from '../theme';

const listStyle = {
marginTop: 10,
...baseFonts,
};

Expand Down

0 comments on commit d8947c1

Please sign in to comment.