@storybook/addon-actions
Advanced tools
Comparing version 3.2.6 to 3.3.0-alpha.0
@@ -58,4 +58,4 @@ 'use strict'; | ||
return this.props.actions.map(function (action, i) { | ||
return _this2.renderAction(action, i); | ||
return this.props.actions.map(function (action) { | ||
return _this2.renderAction(action); | ||
}); | ||
@@ -62,0 +62,0 @@ } |
{ | ||
"name": "@storybook/addon-actions", | ||
"version": "3.2.6", | ||
"version": "3.3.0-alpha.0", | ||
"description": "Action Logger addon for storybook", | ||
@@ -24,3 +24,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@storybook/addons": "^3.2.6", | ||
"@storybook/addons": "^3.3.0-alpha.0", | ||
"deep-equal": "^1.0.1", | ||
@@ -27,0 +27,0 @@ "json-stringify-safe": "^5.0.1", |
@@ -8,16 +8,10 @@ import PropTypes from 'prop-types'; | ||
getActionData() { | ||
return this.props.actions.map((action, i) => this.renderAction(action, i)); | ||
return this.props.actions.map(action => this.renderAction(action)); | ||
} | ||
renderAction(action) { | ||
const counter = ( | ||
<div style={style.counter}> | ||
{action.count} | ||
</div> | ||
); | ||
const counter = <div style={style.counter}>{action.count}</div>; | ||
return ( | ||
<div key={action.id} style={style.action}> | ||
<div style={style.countwrap}> | ||
{action.count > 1 && counter} | ||
</div> | ||
<div style={style.countwrap}>{action.count > 1 && counter}</div> | ||
<div style={style.inspector}> | ||
@@ -37,5 +31,3 @@ <Inspector | ||
<div style={style.wrapper}> | ||
<pre style={style.actions}> | ||
{this.getActionData()} | ||
</pre> | ||
<pre style={style.actions}>{this.getActionData()}</pre> | ||
<button style={style.button} onClick={this.props.onClear}> | ||
@@ -42,0 +34,0 @@ CLEAR |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
193391
608
1