Skip to content

Commit

Permalink
FIX snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed Mar 27, 2020
1 parent d3aceb1 commit 3f3e650
Show file tree
Hide file tree
Showing 49 changed files with 71 additions and 382 deletions.
Expand Up @@ -6,7 +6,7 @@ exports[`react component properties 10017-ts-union 1`] = `
const Avatar = ({
icon
}) => {
return React.createElement(\\"div\\", {
return /*#__PURE__*/React.createElement(\\"div\\", {
className: \\"hello\\"
}, \\"Hello Component \\", icon);
};
Expand Down
Expand Up @@ -7,7 +7,7 @@ exports[`react component properties 8140-js-prop-types-oneof 1`] = `
import React from 'react';
import PropTypes from 'prop-types';

const Alert = props => React.createElement(React.Fragment, null, JSON.stringify(props));
const Alert = props => /*#__PURE__*/React.createElement(React.Fragment, null, JSON.stringify(props));

Alert.defaultProps = {
mode: 'static',
Expand Down
Expand Up @@ -2,7 +2,7 @@

exports[`react component properties 8143-ts-imported-types 1`] = `
"import React from 'react';
export const FooComponent = foo => React.createElement(React.Fragment, null, JSON.stringify(foo));
export const FooComponent = foo => /*#__PURE__*/React.createElement(React.Fragment, null, JSON.stringify(foo));
export const component = FooComponent;
FooComponent.__docgenInfo = {
\\"description\\": \\"\\",
Expand Down
Expand Up @@ -5,7 +5,7 @@ exports[`react component properties 8143-ts-react-fc-generics 1`] = `
export const Text = ({
padding = '0',
margin
}) => React.createElement(React.Fragment, null, \\"Text\\");
}) => /*#__PURE__*/React.createElement(React.Fragment, null, \\"Text\\");
export const component = Text;
Text.__docgenInfo = {
\\"description\\": \\"\\",
Expand Down
Expand Up @@ -11,7 +11,7 @@ import PropTypes from 'prop-types'; // eslint-disable-next-line react/prefer-sta

export default class Test extends React.Component {
render() {
return React.createElement(\\"div\\", null, \\"test\\");
return /*#__PURE__*/React.createElement(\\"div\\", null, \\"test\\");
}

}
Expand Down
Expand Up @@ -10,7 +10,7 @@ const Box = styled.div\`
Box.propTypes = {
bg: PropTypes.string
};
export const MyBox = props => React.createElement(Box, props);
export const MyBox = props => /*#__PURE__*/React.createElement(Box, props);
MyBox.propTypes = {
// eslint-disable-next-line react/require-default-props
bg: PropTypes.string
Expand Down
Expand Up @@ -5,13 +5,13 @@ exports[`react component properties 8740-ts-multi-props 1`] = `
export const Header = ({
size = 'a',
children
}) => React.createElement(\\"div\\", {
}) => /*#__PURE__*/React.createElement(\\"div\\", {
className: size
}, children);
export const Paragraph = ({
size,
children
}) => React.createElement(\\"div\\", {
}) => /*#__PURE__*/React.createElement(\\"div\\", {
className: size
}, children);
Paragraph.defaultProps = {
Expand Down
Expand Up @@ -6,7 +6,9 @@ const Button = forwardRef(({
disabled = false,
variant = 'small',
children
}, ref) => // eslint-disable-next-line react/button-has-type
}, ref) =>
/*#__PURE__*/
// eslint-disable-next-line react/button-has-type
React.createElement(\\"button\\", {
disabled: disabled,
ref: ref
Expand Down
Expand Up @@ -15,7 +15,7 @@ const withStyles = themeFn => Comp => Comp;

class Alert extends React.Component {
render() {
return React.createElement(React.Fragment, null, \\"Alert\\");
return /*#__PURE__*/React.createElement(React.Fragment, null, \\"Alert\\");
}

}
Expand Down
Expand Up @@ -5,7 +5,7 @@ exports[`react component properties 9399-js-proptypes-shape 1`] = `
import PropTypes from 'prop-types';
export const Credits = ({
areas
}) => React.createElement(React.Fragment, null, JSON.stringify(areas)); // https://github.com/storybookjs/storybook/issues/9399
}) => /*#__PURE__*/React.createElement(React.Fragment, null, JSON.stringify(areas)); // https://github.com/storybookjs/storybook/issues/9399

Credits.propTypes = {
areas: PropTypes.arrayOf(PropTypes.shape({
Expand Down
Expand Up @@ -6,7 +6,9 @@ exports[`react component properties 9465-ts-type-props 1`] = `
const Component = ({
disabled = false,
children
}) => // eslint-disable-next-line react/button-has-type
}) =>
/*#__PURE__*/
// eslint-disable-next-line react/button-has-type
React.createElement(\\"button\\", {
disabled: disabled
}, children);
Expand Down
Expand Up @@ -17,7 +17,7 @@ const Wrapper = styled('div')(({
export const EmpireAlert = ({
title = 'Code Yellow',
message
}) => React.createElement(Wrapper, null, React.createElement(\\"h1\\", null, title), React.createElement(\\"p\\", null, message));
}) => /*#__PURE__*/React.createElement(Wrapper, null, /*#__PURE__*/React.createElement(\\"h1\\", null, title), /*#__PURE__*/React.createElement(\\"p\\", null, message));
EmpireAlert.displayName = 'SomeOtherDisplayName';
export const component = EmpireAlert;
EmpireAlert.__docgenInfo = {
Expand Down
Expand Up @@ -8,7 +8,7 @@ import React from 'react';
export const Button = ({
isDisabled = false,
...props
}) => React.createElement(\\"button\\", _extends({
}) => /*#__PURE__*/React.createElement(\\"button\\", _extends({
disabled: isDisabled
}, props));
export const component = Button;
Expand Down
Expand Up @@ -5,7 +5,7 @@ exports[`react component properties 9575-ts-camel-case 1`] = `
import React from 'react';

const iconButton = function IconButton(props) {
return React.createElement(\\"div\\", {
return /*#__PURE__*/React.createElement(\\"div\\", {
className: \\"icon-button\\"
}, \\"icon-button\\");
};
Expand Down
Expand Up @@ -9,7 +9,7 @@ function Button({
onClick
}) {
// eslint-disable-next-line react/button-has-type
return React.createElement(\\"button\\", {
return /*#__PURE__*/React.createElement(\\"button\\", {
onClick: onClick
}, label);
}
Expand Down
Expand Up @@ -3,7 +3,7 @@
exports[`react component properties 9591-ts-import-types 1`] = `
"import React from 'react';

const Other = props => React.createElement(\\"span\\", props, \\"Other\\");
const Other = props => /*#__PURE__*/React.createElement(\\"span\\", props, \\"Other\\");

export const component = Other;
Other.__docgenInfo = {
Expand Down
Expand Up @@ -10,7 +10,7 @@ const StyledHello = styled.div\`
const Hello = ({
title
}) => {
return React.createElement(StyledHello, {
return /*#__PURE__*/React.createElement(StyledHello, {
className: \\"hello\\"
}, \\"Hello Component \\", title);
};
Expand Down
Expand Up @@ -5,7 +5,7 @@ exports[`react component properties 9626-js-default-values 1`] = `

export const Tag = ({
title = 'Beta'
}) => React.createElement(\\"div\\", null, title);
}) => /*#__PURE__*/React.createElement(\\"div\\", null, title);
export const component = Tag;
Tag.__docgenInfo = {
\\"description\\": \\"\\",
Expand Down
Expand Up @@ -9,7 +9,7 @@ exports[`react component properties 9668-js-proptypes-no-jsdoc 1`] = `
import React from 'react';
import PropTypes from 'prop-types';

const CCTable = props => React.createElement(React.Fragment, null, JSON.stringify(props));
const CCTable = props => /*#__PURE__*/React.createElement(React.Fragment, null, JSON.stringify(props));

CCTable.propTypes = {
heads: PropTypes.array.isRequired,
Expand Down
Expand Up @@ -3,7 +3,7 @@
exports[`react component properties 9721-ts-deprecated-jsdoc 1`] = `
"import React from 'react';

const Foo = props => React.createElement(React.Fragment, null, JSON.stringify(props));
const Foo = props => /*#__PURE__*/React.createElement(React.Fragment, null, JSON.stringify(props));

export const component = Foo;
Foo.__docgenInfo = {
Expand Down
Expand Up @@ -3,7 +3,7 @@
exports[`react component properties 9764-ts-extend-props 1`] = `
"import React from 'react';

const Radio = props => React.createElement(React.Fragment, null, JSON.stringify(props));
const Radio = props => /*#__PURE__*/React.createElement(React.Fragment, null, JSON.stringify(props));

export const component = Radio;
Radio.__docgenInfo = {
Expand Down
Expand Up @@ -6,7 +6,7 @@ exports[`react component properties 9827-ts-default-values 1`] = `
const Hello = ({
title
}) => {
return React.createElement(\\"div\\", {
return /*#__PURE__*/React.createElement(\\"div\\", {
className: \\"hello\\"
}, \\"Hello Component \\", title);
};
Expand Down
Expand Up @@ -9,7 +9,7 @@ export let EnumWithExtraProps;
EnumWithExtraProps[\\"key2\\"] = \\"key2\\";
})(EnumWithExtraProps || (EnumWithExtraProps = {}));

export const component = () => React.createElement(\\"div\\", null, \\"hello\\");
export const component = () => /*#__PURE__*/React.createElement(\\"div\\", null, \\"hello\\");
component.__docgenInfo = {
\\"description\\": \\"\\",
\\"methods\\": [],
Expand Down
Expand Up @@ -6,19 +6,19 @@ exports[`react component properties 9922-ts-component-props 1`] = `
const Button = ({
children,
onClick
}) => React.createElement(\\"button\\", {
}) => /*#__PURE__*/React.createElement(\\"button\\", {
onClick: onClick,
type: \\"button\\"
}, children);

const WrappedButton = ({
spacing,
...buttonProps
}) => React.createElement(\\"div\\", {
}) => /*#__PURE__*/React.createElement(\\"div\\", {
style: {
padding: spacing
}
}, React.createElement(Button, buttonProps));
}, /*#__PURE__*/React.createElement(Button, buttonProps));

export const component = WrappedButton;
WrappedButton.__docgenInfo = {
Expand Down
Expand Up @@ -13,7 +13,7 @@ class ErrorBox extends React.Component {
const {
children
} = this.props;
return React.createElement(\\"div\\", {
return /*#__PURE__*/React.createElement(\\"div\\", {
className: \\"error-box\\"
}, children);
}
Expand Down
Expand Up @@ -8,7 +8,7 @@ exports[`react component properties ts-function-component 1`] = `
*/
export const Button = ({
onClick
}) => React.createElement(\\"button\\", {
}) => /*#__PURE__*/React.createElement(\\"button\\", {
onClick: onClick,
type: \\"button\\"
}, \\"hello\\");
Expand Down
Expand Up @@ -7,7 +7,7 @@ import { assertIsFn, AddContext } from '@storybook/addon-docs/blocks';
import { Button } from '@storybook/react/demo';
import { Story, Meta } from '@storybook/addon-docs/blocks';

const makeShortcode = name =>
const makeShortcode = (name) =>
function MDXDefaultShortcode(props) {
console.warn(
'Component ' +
Expand Down
10 changes: 5 additions & 5 deletions addons/docs/src/mdx/__testfixtures__/decorators.output.snapshot
Expand Up @@ -7,7 +7,7 @@ import { assertIsFn, AddContext } from '@storybook/addon-docs/blocks';
import { Button } from '@storybook/react/demo';
import { Story, Meta } from '@storybook/addon-docs/blocks';

const makeShortcode = name =>
const makeShortcode = (name) =>
function MDXDefaultShortcode(props) {
console.warn(
'Component ' +
Expand All @@ -25,7 +25,7 @@ function MDXContent({ components, ...props }) {
<Meta
title=\\"Button\\"
decorators={[
storyFn => (
(storyFn) => (
<div
style={{
backgroundColor: 'yellow',
Expand All @@ -40,7 +40,7 @@ function MDXContent({ components, ...props }) {
<h1>{\`Decorated story\`}</h1>
<Story
name=\\"one\\"
decorators={[storyFn => <div className=\\"local\\">{storyFn()}</div>]}
decorators={[(storyFn) => <div className=\\"local\\">{storyFn()}</div>]}
mdxType=\\"Story\\"
>
<Button mdxType=\\"Button\\">One</Button>
Expand All @@ -55,12 +55,12 @@ export const one = () => <Button>One</Button>;
one.story = {};
one.story.name = 'one';
one.story.parameters = { storySource: { source: '<Button>One</Button>' } };
one.story.decorators = [storyFn => <div className=\\"local\\">{storyFn()}</div>];
one.story.decorators = [(storyFn) => <div className=\\"local\\">{storyFn()}</div>];

const componentMeta = {
title: 'Button',
decorators: [
storyFn => (
(storyFn) => (
<div
style={{
backgroundColor: 'yellow',
Expand Down
Expand Up @@ -6,7 +6,7 @@ import { assertIsFn, AddContext } from '@storybook/addon-docs/blocks';

import { Meta } from '@storybook/addon-docs/blocks';

const makeShortcode = name =>
const makeShortcode = (name) =>
function MDXDefaultShortcode(props) {
console.warn(
'Component ' +
Expand Down
Expand Up @@ -6,7 +6,7 @@ import { assertIsFn, AddContext } from '@storybook/addon-docs/blocks';

import { Meta } from '@storybook/addon-docs/blocks';

const makeShortcode = name =>
const makeShortcode = (name) =>
function MDXDefaultShortcode(props) {
console.warn(
'Component ' +
Expand Down
Expand Up @@ -7,7 +7,7 @@ import { assertIsFn, AddContext } from '@storybook/addon-docs/blocks';
import { Button } from '@storybook/react/demo';
import { Story, Meta } from '@storybook/addon-docs/blocks';
export const two = 2;
const makeShortcode = name =>
const makeShortcode = (name) =>
function MDXDefaultShortcode(props) {
console.warn(
'Component ' +
Expand Down
Expand Up @@ -7,7 +7,7 @@ import { assertIsFn, AddContext } from '@storybook/addon-docs/blocks';
import { Button } from '@storybook/react/demo';
import { Story, Meta } from '@storybook/addon-docs/blocks';

const makeShortcode = name =>
const makeShortcode = (name) =>
function MDXDefaultShortcode(props) {
console.warn(
'Component ' +
Expand Down
Expand Up @@ -7,7 +7,7 @@ import { assertIsFn, AddContext } from '@storybook/addon-docs/blocks';
import { Button } from '@storybook/react/demo';
import { Preview, Story, Meta } from '@storybook/addon-docs/blocks';

const makeShortcode = name =>
const makeShortcode = (name) =>
function MDXDefaultShortcode(props) {
console.warn(
'Component ' +
Expand Down
Expand Up @@ -6,7 +6,7 @@ import { assertIsFn, AddContext } from '@storybook/addon-docs/blocks';

import { Story } from '@storybook/addon-docs/blocks';

const makeShortcode = name =>
const makeShortcode = (name) =>
function MDXDefaultShortcode(props) {
console.warn(
'Component ' +
Expand Down
Expand Up @@ -6,7 +6,7 @@ import { assertIsFn, AddContext } from '@storybook/addon-docs/blocks';

import { Story, Meta } from '@storybook/addon-docs/blocks';

const makeShortcode = name =>
const makeShortcode = (name) =>
function MDXDefaultShortcode(props) {
console.warn(
'Component ' +
Expand Down
Expand Up @@ -7,7 +7,7 @@ import { assertIsFn, AddContext } from '@storybook/addon-docs/blocks';
import { Button } from '@storybook/react/demo';
import { Story, Meta } from '@storybook/addon-docs/blocks';

const makeShortcode = name =>
const makeShortcode = (name) =>
function MDXDefaultShortcode(props) {
console.warn(
'Component ' +
Expand Down
Expand Up @@ -6,7 +6,7 @@ import { assertIsFn, AddContext } from '@storybook/addon-docs/blocks';

import { Meta, Story } from '@storybook/addon-docs/blocks';
export const basicFn = () => <Button mdxType=\\"Button\\" />;
const makeShortcode = name =>
const makeShortcode = (name) =>
function MDXDefaultShortcode(props) {
console.warn(
'Component ' +
Expand Down
Expand Up @@ -4,7 +4,7 @@ exports[`docs-mdx-compiler-plugin story-function.mdx 1`] = `
"/* @jsx mdx */
import { assertIsFn, AddContext } from '@storybook/addon-docs/blocks';

const makeShortcode = name =>
const makeShortcode = (name) =>
function MDXDefaultShortcode(props) {
console.warn(
'Component ' +
Expand Down

0 comments on commit 3f3e650

Please sign in to comment.