Skip to content

Commit

Permalink
Fix stories scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
thani-sh committed Apr 7, 2016
1 parent 72bdc26 commit 33e0a85
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 18 deletions.
36 changes: 29 additions & 7 deletions dist/client/ui/controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,19 @@ var StorybookControls = function (_React$Component) {
var kindNames = this.getKindNames();
var mainStyle = {
fontFamily: '\n -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto",\n "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif\n ',
padding: '20px 10px 10px 10px',
color: '#444'
};

var h1WrapStyle = {
background: '#F7F7F7',
borderBottom: '1px solid #EEE',
paddingBottom: '20px',
position: 'absolute',
top: '20px',
right: '10px',
left: '20px'
};

var h1Style = {
textTransform: 'uppercase',
letterSpacing: '3.5px',
Expand All @@ -168,21 +177,34 @@ var StorybookControls = function (_React$Component) {
textAlign: 'center',
borderRadius: '2px',
padding: '5px',
margin: '0 0 20px 0',
cursor: 'default'
cursor: 'default',
margin: 0
};

var listStyle = {
overflowY: 'auto',
position: 'absolute',
top: '68px',
right: '10px',
bottom: 0,
left: '20px'
};

return _react2.default.createElement(
'div',
{ style: mainStyle },
_react2.default.createElement(
'h3',
{ style: h1Style },
'React Storybook'
'div',
{ style: h1WrapStyle },
_react2.default.createElement(
'h3',
{ style: h1Style },
'React Storybook'
)
),
_react2.default.createElement(
'div',
null,
{ style: listStyle },
kindNames.map(this.renderKind.bind(this))
)
);
Expand Down
7 changes: 3 additions & 4 deletions dist/client/ui/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,9 @@ var Layout = function (_React$Component) {
};

var controlsStyle = {
height: '100%',
overflowY: 'auto',
padding: '5px 0 5px 10px',
boxSizing: 'border-box'
position: 'absolute',
width: '100%',
height: '100%'
};

var actionStyle = {
Expand Down
28 changes: 24 additions & 4 deletions src/client/ui/controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,19 @@ export default class StorybookControls extends React.Component {
-apple-system, ".SFNSText-Regular", "San Francisco", "Roboto",
"Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif
`,
padding: '20px 10px 10px 10px',
color: '#444',
};

const h1WrapStyle = {
background: '#F7F7F7',
borderBottom: '1px solid #EEE',
paddingBottom: '20px',
position: 'absolute',
top: '20px',
right: '10px',
left: '20px',
};

const h1Style = {
textTransform: 'uppercase',
letterSpacing: '3.5px',
Expand All @@ -111,14 +120,25 @@ export default class StorybookControls extends React.Component {
textAlign: 'center',
borderRadius: '2px',
padding: '5px',
margin: '0 0 20px 0',
cursor: 'default',
margin: 0,
};

const listStyle = {
overflowY: 'auto',
position: 'absolute',
top: '68px',
right: '10px',
bottom: 0,
left: '20px',
};

return (
<div style={mainStyle}>
<h3 style={h1Style}>React Storybook</h3>
<div>
<div style={h1WrapStyle}>
<h3 style={h1Style}>React Storybook</h3>
</div>
<div style={listStyle}>
{kindNames.map(this.renderKind.bind(this))}
</div>
</div>
Expand Down
5 changes: 2 additions & 3 deletions src/client/ui/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ class Layout extends React.Component {
};

const controlsStyle = {
position: 'absolute',
width: '100%',
height: '100%',
overflowY: 'auto',
padding: '5px 0 5px 10px',
boxSizing: 'border-box',
};

const actionStyle = {
Expand Down

0 comments on commit 33e0a85

Please sign in to comment.