@storybook/addon-actions
Advanced tools
Comparing version 3.1.8 to 3.1.9
@@ -65,3 +65,3 @@ 'use strict'; | ||
// Ref: https://bocoup.com/weblog/whats-in-a-function-name | ||
var fnName = name ? name.replace(/\W+/g, '_') : 'action'; | ||
var fnName = name && typeof name === 'string' ? name.replace(/\W+/g, '_') : 'action'; | ||
// eslint-disable-next-line no-eval | ||
@@ -68,0 +68,0 @@ var named = eval('(function ' + fnName + '() { return handler.apply(this, arguments) })'); |
{ | ||
"name": "@storybook/addon-actions", | ||
"version": "3.1.8", | ||
"version": "3.1.9", | ||
"description": "Action Logger addon for storybook", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -12,3 +12,7 @@ import PropTypes from 'prop-types'; | ||
renderAction(action) { | ||
const counter = <div style={style.counter}>{action.count}</div>; | ||
const counter = ( | ||
<div style={style.counter}> | ||
{action.count} | ||
</div> | ||
); | ||
return ( | ||
@@ -33,4 +37,8 @@ <div key={action.id} style={style.action}> | ||
<div style={style.wrapper}> | ||
<pre style={style.actions}>{this.getActionData()}</pre> | ||
<button style={style.button} onClick={this.props.onClear}>CLEAR</button> | ||
<pre style={style.actions}> | ||
{this.getActionData()} | ||
</pre> | ||
<button style={style.button} onClick={this.props.onClear}> | ||
CLEAR | ||
</button> | ||
</div> | ||
@@ -37,0 +45,0 @@ ); |
@@ -33,3 +33,3 @@ /* eslint-disable no-underscore-dangle */ | ||
// Ref: https://bocoup.com/weblog/whats-in-a-function-name | ||
const fnName = name ? name.replace(/\W+/g, '_') : 'action'; | ||
const fnName = name && typeof name === 'string' ? name.replace(/\W+/g, '_') : 'action'; | ||
// eslint-disable-next-line no-eval | ||
@@ -36,0 +36,0 @@ const named = eval(`(function ${fnName}() { return handler.apply(this, arguments) })`); |
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
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
193458
616