Fix new errors

This commit is contained in:
hypnos 2017-08-18 19:10:28 +03:00
parent 4b4914833f
commit 85aeb4ee72
5 changed files with 477 additions and 6 deletions

View File

@ -8,6 +8,9 @@
"scripts": {
"prepublish": "node ../../scripts/prepublish.js"
},
"dependencies": {
"global": "^4.3.2"
},
"peerDependencies": {
"react": "*"
}

View File

@ -1,4 +1,4 @@
export default function () {
export default function() {
return {
template: `
<div :style="style">
@ -22,8 +22,8 @@ export default function () {
},
innerStyle: {
margin: 'auto',
}
}
}
}
},
};
},
};
}

View File

@ -1,5 +1,473 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Storyshots AddonInfo.DocgenButton DocgenButton 1`] = `
<div>
<div
style={
Object {
"position": "relative",
"zIndex": 0,
}
}
>
<button
disabled={false}
onClick={[Function]}
>
Docgen Button
</button>
</div>
<a
onClick={[Function]}
role="button"
style={
Object {
"background": "#28c",
"borderRadius": "0 0 0 5px",
"color": "#fff",
"cursor": "pointer",
"display": "block",
"fontFamily": "sans-serif",
"fontSize": "12px",
"padding": "5px 15px",
"position": "fixed",
"right": 0,
"textDecoration": "none",
"top": 0,
}
}
tabIndex="0"
>
Show Info
</a>
<div
style={
Object {
"background": "white",
"bottom": 0,
"display": "none",
"left": 0,
"overflow": "auto",
"padding": "0 40px",
"position": "fixed",
"right": 0,
"top": 0,
"zIndex": 99999,
}
}
>
<a
onClick={[Function]}
role="button"
style={
Object {
"background": "#28c",
"borderRadius": "0 0 0 5px",
"color": "#fff",
"cursor": "pointer",
"display": "block",
"fontFamily": "sans-serif",
"fontSize": "12px",
"padding": "5px 15px",
"position": "fixed",
"right": 0,
"textDecoration": "none",
"top": 0,
}
}
tabIndex="0"
>
×
</a>
<div
style={undefined}
>
<div
style={
Object {
"WebkitFontSmoothing": "antialiased",
"backgroundColor": "#fff",
"border": "1px solid #eee",
"borderRadius": "2px",
"boxShadow": "0px 2px 3px rgba(0, 0, 0, 0.05)",
"color": "#444",
"fontFamily": "-apple-system, \\".SFNSText-Regular\\", \\"San Francisco\\", BlinkMacSystemFont, \\"Segoe UI\\", \\"Roboto\\", \\"Oxygen\\", \\"Ubuntu\\", \\"Cantarell\\", \\"Fira Sans\\", \\"Droid Sans\\", \\"Helvetica Neue\\", \\"Lucida Grande\\", \\"Arial\\", sans-serif",
"fontSize": "15px",
"fontWeight": 300,
"lineHeight": 1.45,
"marginTop": "50px",
"padding": "20px 40px 40px",
}
}
>
<div
style={
Object {
"borderBottom": "1px solid #eee",
"marginBottom": 10,
"paddingTop": 10,
}
}
>
<h1
style={
Object {
"fontSize": "35px",
"margin": 0,
"padding": 0,
}
}
>
AddonInfo.DocgenButton
</h1>
<h2
style={
Object {
"fontSize": "22px",
"fontWeight": 400,
"margin": "0 0 10px 0",
"padding": 0,
}
}
>
DocgenButton
</h2>
</div>
<div
style={
Object {
"marginBottom": 0,
}
}
>
<p
style={
Object {
"WebkitFontSmoothing": "antialiased",
"color": "#444",
"fontFamily": "-apple-system, \\".SFNSText-Regular\\", \\"San Francisco\\", BlinkMacSystemFont, \\"Segoe UI\\", \\"Roboto\\", \\"Oxygen\\", \\"Ubuntu\\", \\"Cantarell\\", \\"Fira Sans\\", \\"Droid Sans\\", \\"Helvetica Neue\\", \\"Lucida Grande\\", \\"Arial\\", sans-serif",
"fontSize": "15px",
}
}
>
Some Description
</p>
</div>
<div>
<h1
style={
Object {
"borderBottom": "1px solid #EEE",
"fontSize": "25px",
"margin": "20px 0 0 0",
"padding": "0 0 5px 0",
}
}
>
Story Source
</h1>
<pre
style={
Object {
"backgroundColor": "#fafafa",
"fontFamily": "Menlo, Monaco, \\"Courier New\\", monospace",
"fontSize": ".88em",
"lineHeight": 1.5,
"overflowX": "scroll",
"padding": ".5rem",
}
}
>
<div
style={
Object {
"paddingLeft": 18,
"paddingRight": 3,
}
}
>
<span
style={
Object {
"color": "#777",
}
}
>
&lt;
DocgenButton
</span>
<span>
<span>
<span
style={Object {}}
>
onClick
</span>
<span>
=
<span
style={Object {}}
>
<span>
<span
style={
Object {
"color": "#170",
}
}
>
clicked()
</span>
</span>
</span>
</span>
</span>
<span>
<span
style={Object {}}
>
label
</span>
<span>
=
<span
style={Object {}}
>
<span
style={
Object {
"color": "#22a",
"wordBreak": "break-word",
}
}
>
"
Docgen Button
"
</span>
</span>
</span>
</span>
</span>
<span
style={
Object {
"color": "#777",
}
}
>
/&gt;
</span>
</div>
</pre>
</div>
<div>
<h1
style={
Object {
"borderBottom": "1px solid #EEE",
"fontSize": "25px",
"margin": "20px 0 0 0",
"padding": "0 0 5px 0",
}
}
>
Prop Types
</h1>
<div>
<h2
style={
Object {
"margin": "20px 0 0 0",
}
}
>
"
DocgenButton
" Component
</h2>
<table
style={
Object {
"borderCollapse": "separate",
"borderSpacing": "10px 5px",
"marginLeft": -10,
}
}
>
<thead>
<tr>
<th>
property
</th>
<th>
propType
</th>
<th>
required
</th>
<th>
default
</th>
<th>
description
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
disabled
</td>
<td>
bool
</td>
<td>
no
</td>
<td>
<span>
<span
style={
Object {
"color": "#a11",
}
}
>
false
</span>
</span>
</td>
<td />
</tr>
<tr>
<td>
enm
</td>
<td>
other
</td>
<td>
no
</td>
<td>
-
</td>
<td />
</tr>
<tr>
<td>
label
</td>
<td>
string
</td>
<td>
yes
</td>
<td>
-
</td>
<td />
</tr>
<tr>
<td>
msg
</td>
<td>
other
</td>
<td>
no
</td>
<td>
-
</td>
<td />
</tr>
<tr>
<td>
onClick
</td>
<td>
func
</td>
<td>
no
</td>
<td>
<span>
<span
style={
Object {
"color": "#170",
}
}
>
onClick()
</span>
</span>
</td>
<td />
</tr>
<tr>
<td>
one
</td>
<td>
other
</td>
<td>
no
</td>
<td>
-
</td>
<td />
</tr>
<tr>
<td>
two
</td>
<td>
other
</td>
<td>
no
</td>
<td>
-
</td>
<td />
</tr>
<tr>
<td>
union
</td>
<td>
other
</td>
<td>
no
</td>
<td>
-
</td>
<td />
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
`;
exports[`Storyshots App full app 1`] = `
<div
className="App"

View File

@ -7,6 +7,7 @@
"@storybook/addon-actions": "^3.2.0",
"@storybook/addon-links": "^3.2.0",
"@storybook/addons": "^3.2.0",
"@storybook/addon-centered": "^3.2.1",
"@storybook/addon-notes": "^3.2.0",
"@storybook/addon-knobs": "^3.2.0",
"babel-core": "^6.25.0",

View File

@ -13,7 +13,6 @@ module.exports = Promise.all([
const packageJson = helpers.getPackageJson();
packageJson.devDependencies = packageJson.devDependencies || {};
packageJson.devDependencies['@storybook/react'] = `^${storybookVersion}`;