mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-09 00:19:13 +08:00
Fix eslint in snapshots
This commit is contained in:
parent
8176beefcb
commit
fddbcff756
@ -1,5 +1,3 @@
|
||||
/* eslint-disable react/require-default-props */
|
||||
/* eslint-disable react/no-unused-prop-types */
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
const Alert = props => /*#__PURE__*/React.createElement(React.Fragment, null, JSON.stringify(props));
|
||||
|
@ -1,12 +1,8 @@
|
||||
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
||||
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
||||
/* eslint-disable react/no-unused-prop-types */
|
||||
/* eslint-disable react/require-default-props */
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
// eslint-disable-next-line react/prefer-stateless-function
|
||||
export default class Test extends React.Component {
|
||||
render() {
|
||||
return /*#__PURE__*/React.createElement("div", null, "test");
|
||||
|
@ -1,7 +1,3 @@
|
||||
/* eslint-disable react/require-default-props */
|
||||
/* eslint-disable react/forbid-prop-types */
|
||||
/* eslint-disable react/no-unused-prop-types */
|
||||
/* eslint-disable react/prefer-stateless-function */
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
|
@ -2,10 +2,7 @@ import React from 'react';
|
||||
const Component = ({
|
||||
disabled = false,
|
||||
children
|
||||
}) =>
|
||||
/*#__PURE__*/
|
||||
// eslint-disable-next-line react/button-has-type
|
||||
React.createElement("button", {
|
||||
}) => /*#__PURE__*/React.createElement("button", {
|
||||
disabled: disabled
|
||||
}, children);
|
||||
export const component = Component;
|
||||
|
@ -1,5 +1,4 @@
|
||||
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||||
/* eslint-disable react/button-has-type */
|
||||
import React from 'react';
|
||||
export const Button = ({
|
||||
isDisabled = false,
|
||||
|
@ -4,7 +4,6 @@ function Button({
|
||||
label,
|
||||
onClick
|
||||
}) {
|
||||
// eslint-disable-next-line react/button-has-type
|
||||
return /*#__PURE__*/React.createElement("button", {
|
||||
onClick: onClick
|
||||
}, label);
|
||||
|
@ -1,6 +1,3 @@
|
||||
/* eslint-disable react/forbid-prop-types */
|
||||
/* eslint-disable react/require-default-props */
|
||||
/* eslint-disable react/no-unused-prop-types */
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
const CCTable = props => /*#__PURE__*/React.createElement(React.Fragment, null, JSON.stringify(props));
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* eslint-disable react/require-default-props, react/no-unused-prop-types */
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
const JsDocProps = () => /*#__PURE__*/React.createElement("div", null, "JSDoc with PropTypes!");
|
||||
|
Loading…
x
Reference in New Issue
Block a user