Make left-panel scrollable.

This commit is contained in:
Arunoda Susiripala 2016-05-10 13:46:20 +05:30
parent f9046d29f8
commit a6424b1ab7
4 changed files with 18 additions and 12 deletions

4
dist/manager.js vendored

File diff suppressed because one or more lines are too long

2
dist/manager.js.map vendored
View File

@ -1 +1 @@
{"version":3,"file":"manager.js","sources":["webpack:///manager.js","webpack:///"],"mappings":"AAAA;ACkgIA;;;;;;;;;;;;;;AAwvDA;;;;;;;;;;;AA6+CA;AAijJA;AAi/DA;;;;;AAynEA;;;AAqRA;AA02HA;AA27HA;AAqjHA","sourceRoot":""}
{"version":3,"file":"manager.js","sources":["webpack:///manager.js","webpack:///"],"mappings":"AAAA;ACkgIA;;;;;;;;;;;;;;AAwvDA;;;;;;;;;;;AA6+CA;AAijJA;AAk/DA;;;;;AAgoEA;;;AAqRA;AA02HA;AA27HA;AAqjHA","sourceRoot":""}

View File

@ -4,6 +4,11 @@ import Stories from './stories';
import TextFilter from './text_filter';
import pick from 'lodash.pick';
const scrollStyle = {
height: '100vh',
overflowY: 'auto',
};
const mainStyle = {
padding: 20,
};
@ -11,14 +16,16 @@ const mainStyle = {
const storyProps = ['stories', 'selectedKind', 'selectedStory', 'onSelectStory'];
const LeftPanel = (props) => (
<div style={mainStyle}>
<Header openShortcutsHelp={props.openShortcutsHelp} />
<TextFilter
text={props.storyFilter}
onClear={() => props.onStoryFilter('')}
onChange={(text) => props.onStoryFilter(text)}
/>
{props.stories ? (<Stories {...pick(props, storyProps)} />) : null}
<div style={scrollStyle}>
<div style={mainStyle}>
<Header openShortcutsHelp={props.openShortcutsHelp} />
<TextFilter
text={props.storyFilter}
onClear={() => props.onStoryFilter('')}
onChange={(text) => props.onStoryFilter(text)}
/>
{props.stories ? (<Stories {...pick(props, storyProps)} />) : null}
</div>
</div>
);

View File

@ -2,7 +2,6 @@ import React from 'react';
import { baseFonts } from '../theme';
const listStyle = {
overflowY: 'auto',
marginTop: 10,
...baseFonts,
};