mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-06 00:31:05 +08:00
Make left-panel scrollable.
This commit is contained in:
parent
f9046d29f8
commit
a6424b1ab7
4
dist/manager.js
vendored
4
dist/manager.js
vendored
File diff suppressed because one or more lines are too long
2
dist/manager.js.map
vendored
2
dist/manager.js.map
vendored
@ -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":""}
|
@ -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>
|
||||
);
|
||||
|
||||
|
@ -2,7 +2,6 @@ import React from 'react';
|
||||
import { baseFonts } from '../theme';
|
||||
|
||||
const listStyle = {
|
||||
overflowY: 'auto',
|
||||
marginTop: 10,
|
||||
...baseFonts,
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user