From 00881462d2903094f1d61517d04c1f2eb3a91a20 Mon Sep 17 00:00:00 2001 From: Eli Sherer Date: Tue, 13 Dec 2016 16:23:46 +0200 Subject: [PATCH 1/3] add fluent to index.js --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 859c8150195a..60128f0d52f5 100644 --- a/src/index.js +++ b/src/index.js @@ -54,7 +54,7 @@ export default { Object.assign(mtrcConf, options.mtrcConf); } - this.add(storyName, (context) => { + return this.add(storyName, (context) => { const props = { info, context, From 742a3d1f5101f034a585ea6eb7f6de133c76cea5 Mon Sep 17 00:00:00 2001 From: Eli Sherer Date: Tue, 13 Dec 2016 16:25:03 +0200 Subject: [PATCH 2/3] dist --- dist/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index ee84c06e7f82..a5bc187209e1 100644 --- a/dist/index.js +++ b/dist/index.js @@ -77,7 +77,7 @@ exports.default = { (0, _assign2.default)(mtrcConf, options.mtrcConf); } - this.add(storyName, function (context) { + return this.add(storyName, function (context) { var props = { info: info, context: context, @@ -98,4 +98,4 @@ exports.default = { }; function setDefaults(newDefaults) { return (0, _assign2.default)(defaultOptions, newDefaults); -}; \ No newline at end of file +}; From 4f45bf23057f7c91c24d39091e509d3e69a2074b Mon Sep 17 00:00:00 2001 From: elish Date: Tue, 13 Dec 2016 18:05:01 +0200 Subject: [PATCH 3/3] fix warnings about unitless numbers --- dist/components/Story.js | 10 +++++----- dist/components/markdown/htags.js | 12 ++++++------ dist/components/markdown/text.js | 6 +++--- src/components/Story.js | 10 +++++----- src/components/markdown/htags.js | 12 ++++++------ src/components/markdown/text.js | 6 +++--- 6 files changed, 28 insertions(+), 28 deletions(-) diff --git a/dist/components/Story.js b/dist/components/Story.js index 5ba0151d12a3..6379beb66c4b 100644 --- a/dist/components/Story.js +++ b/dist/components/Story.js @@ -66,7 +66,7 @@ var stylesheet = { link: { base: { fontFamily: 'sans-serif', - fontSize: 12, + fontSize: '12px', display: 'block', position: 'fixed', textDecoration: 'none', @@ -98,7 +98,7 @@ var stylesheet = { infoBody: (0, _extends3.default)({}, _theme.baseFonts, { fontWeight: 300, lineHeight: 1.45, - fontSize: 15 + fontSize: '15px' }), infoContent: { marginBottom: 0 @@ -107,13 +107,13 @@ var stylesheet = { h1: { margin: '20px 0 0 0', padding: 0, - fontSize: 35 + fontSize: '35px' }, h2: { margin: '0 0 10px 0', padding: 0, fontWeight: 400, - fontSize: 22 + fontSize: '22px' }, body: { borderBottom: '1px solid #eee', @@ -124,7 +124,7 @@ var stylesheet = { h1: { margin: '20px 0 0 0', padding: '0 0 5px 0', - fontSize: 25, + fontSize: '25px', borderBottom: '1px solid #EEE' } }, diff --git a/dist/components/markdown/htags.js b/dist/components/markdown/htags.js index 40417f6fea1b..41bd49b38e54 100644 --- a/dist/components/markdown/htags.js +++ b/dist/components/markdown/htags.js @@ -53,7 +53,7 @@ var H1 = exports.H1 = function (_React$Component) { fontWeight: 600, margin: 0, padding: 0, - fontSize: '40' + fontSize: '40px' }); return _react2.default.createElement( @@ -81,7 +81,7 @@ var H2 = exports.H2 = function (_React$Component2) { fontWeight: 600, margin: 0, padding: 0, - fontSize: '30' + fontSize: '30px' }); return _react2.default.createElement( @@ -109,7 +109,7 @@ var H3 = exports.H3 = function (_React$Component3) { fontWeight: 600, margin: 0, padding: 0, - fontSize: '22', + fontSize: '22px', textTransform: 'uppercase' }); @@ -138,7 +138,7 @@ var H4 = exports.H4 = function (_React$Component4) { fontWeight: 600, margin: 0, padding: 0, - fontSize: '20' + fontSize: '20px' }); return _react2.default.createElement( @@ -166,7 +166,7 @@ var H5 = exports.H5 = function (_React$Component5) { fontWeight: 600, margin: 0, padding: 0, - fontSize: '18' + fontSize: '18px' }); return _react2.default.createElement( @@ -194,7 +194,7 @@ var H6 = exports.H6 = function (_React$Component6) { fontWeight: 400, margin: 0, padding: 0, - fontSize: '18' + fontSize: '18px' }); return _react2.default.createElement( diff --git a/dist/components/markdown/text.js b/dist/components/markdown/text.js index f15fd352250c..b61eb3c358d1 100644 --- a/dist/components/markdown/text.js +++ b/dist/components/markdown/text.js @@ -49,7 +49,7 @@ var P = exports.P = function (_React$Component) { key: 'render', value: function render() { var style = (0, _extends3.default)({}, _theme.baseFonts, { - fontSize: 15 + fontSize: '15px' }); return _react2.default.createElement( 'p', @@ -73,7 +73,7 @@ var LI = exports.LI = function (_React$Component2) { key: 'render', value: function render() { var style = (0, _extends3.default)({}, _theme.baseFonts, { - fontSize: 15 + fontSize: '15px' }); return _react2.default.createElement( 'li', @@ -97,7 +97,7 @@ var UL = exports.UL = function (_React$Component3) { key: 'render', value: function render() { var style = (0, _extends3.default)({}, _theme.baseFonts, { - fontSize: 15 + fontSize: '15px' }); return _react2.default.createElement( diff --git a/src/components/Story.js b/src/components/Story.js index 029bd0e08612..2afebccfa568 100644 --- a/src/components/Story.js +++ b/src/components/Story.js @@ -9,7 +9,7 @@ const stylesheet = { link: { base: { fontFamily: 'sans-serif', - fontSize: 12, + fontSize: '12px', display: 'block', position: 'fixed', textDecoration: 'none', @@ -42,7 +42,7 @@ const stylesheet = { ...baseFonts, fontWeight: 300, lineHeight: 1.45, - fontSize: 15, + fontSize: '15px', }, infoContent: { marginBottom: 0, @@ -51,13 +51,13 @@ const stylesheet = { h1: { margin: '20px 0 0 0', padding: 0, - fontSize: 35, + fontSize: '35px', }, h2: { margin: '0 0 10px 0', padding: 0, fontWeight: 400, - fontSize: 22, + fontSize: '22px', }, body: { borderBottom: '1px solid #eee', @@ -68,7 +68,7 @@ const stylesheet = { h1: { margin: '20px 0 0 0', padding: '0 0 5px 0', - fontSize: 25, + fontSize: '25px', borderBottom: '1px solid #EEE', }, }, diff --git a/src/components/markdown/htags.js b/src/components/markdown/htags.js index ba9291c7a390..0fb0007f5552 100644 --- a/src/components/markdown/htags.js +++ b/src/components/markdown/htags.js @@ -9,7 +9,7 @@ export class H1 extends React.Component { fontWeight: 600, margin: 0, padding: 0, - fontSize: '40', + fontSize: '40px', }; return

{this.props.children}

; @@ -23,7 +23,7 @@ export class H2 extends React.Component { fontWeight: 600, margin: 0, padding: 0, - fontSize: '30', + fontSize: '30px', }; return

{this.props.children}

; @@ -37,7 +37,7 @@ export class H3 extends React.Component { fontWeight: 600, margin: 0, padding: 0, - fontSize: '22', + fontSize: '22px', textTransform: 'uppercase', }; @@ -52,7 +52,7 @@ export class H4 extends React.Component { fontWeight: 600, margin: 0, padding: 0, - fontSize: '20', + fontSize: '20px', }; return

{this.props.children}

; @@ -66,7 +66,7 @@ export class H5 extends React.Component { fontWeight: 600, margin: 0, padding: 0, - fontSize: '18', + fontSize: '18px', }; return
{this.props.children}
; @@ -80,7 +80,7 @@ export class H6 extends React.Component { fontWeight: 400, margin: 0, padding: 0, - fontSize: '18', + fontSize: '18px', }; return
{this.props.children}
; diff --git a/src/components/markdown/text.js b/src/components/markdown/text.js index f5c739a5bcef..58f35c18e9bc 100644 --- a/src/components/markdown/text.js +++ b/src/components/markdown/text.js @@ -5,7 +5,7 @@ export class P extends React.Component { render() { const style = { ...baseFonts, - fontSize: 15, + fontSize: '15px', }; return

{this.props.children}

; } @@ -15,7 +15,7 @@ export class LI extends React.Component { render() { const style = { ...baseFonts, - fontSize: 15, + fontSize: '15px', }; return
  • {this.props.children}
  • ; } @@ -25,7 +25,7 @@ export class UL extends React.Component { render() { const style = { ...baseFonts, - fontSize: 15, + fontSize: '15px', }; return
      {this.props.children}
    ;