From 33e0a8522bf0194cbd1e1c2b1445151c99c1d6c3 Mon Sep 17 00:00:00 2001 From: Muhammed Thanish Date: Thu, 7 Apr 2016 15:11:47 +0530 Subject: [PATCH] Fix stories scroll --- dist/client/ui/controls.js | 36 +++++++++++++++++++++++++++++------- dist/client/ui/layout.js | 7 +++---- src/client/ui/controls.js | 28 ++++++++++++++++++++++++---- src/client/ui/layout.js | 5 ++--- 4 files changed, 58 insertions(+), 18 deletions(-) diff --git a/dist/client/ui/controls.js b/dist/client/ui/controls.js index 4ab0cb3c4df8..e53aea898f31 100644 --- a/dist/client/ui/controls.js +++ b/dist/client/ui/controls.js @@ -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', @@ -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)) ) ); diff --git a/dist/client/ui/layout.js b/dist/client/ui/layout.js index 46aae5a16963..de4c8eb4dc3a 100644 --- a/dist/client/ui/layout.js +++ b/dist/client/ui/layout.js @@ -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 = { diff --git a/src/client/ui/controls.js b/src/client/ui/controls.js index 8e46919d39b1..625882409aeb 100644 --- a/src/client/ui/controls.js +++ b/src/client/ui/controls.js @@ -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', @@ -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 (
-

React Storybook

-
+
+

React Storybook

+
+
{kindNames.map(this.renderKind.bind(this))}
diff --git a/src/client/ui/layout.js b/src/client/ui/layout.js index 4fbce3135c24..9324f3caeef0 100644 --- a/src/client/ui/layout.js +++ b/src/client/ui/layout.js @@ -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 = {