fbredius/storybook

View on GitHub
addons/docs/src/frameworks/react/__testfixtures__/8140-js-prop-types-oneof/docgen.snapshot

Summary

Maintainability
Test Coverage
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`react component properties 8140-js-prop-types-oneof 1`] = `
"import React from 'react';
import PropTypes from 'prop-types';

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

Alert.defaultProps = {
  mode: 'static',
  type: 'warning'
};
Alert.propTypes = {
  mode: PropTypes.oneOf(['static', 'timed']),
  type: PropTypes.oneOf(['success', 'warning', 'error', 'primary']),
  message: PropTypes.string.isRequired,

  /**
   * No background or border if static alert
   */
  blank: PropTypes.bool,

  /**
   * Allows icon override, accepts material icon name
   */
  icon: PropTypes.string
};
export const component = Alert;
Alert.__docgenInfo = {
  \\"description\\": \\"\\",
  \\"methods\\": [],
  \\"displayName\\": \\"Alert\\",
  \\"props\\": {
    \\"mode\\": {
      \\"defaultValue\\": {
        \\"value\\": \\"'static'\\",
        \\"computed\\": false
      },
      \\"type\\": {
        \\"name\\": \\"enum\\",
        \\"value\\": [{
          \\"value\\": \\"'static'\\",
          \\"computed\\": false
        }, {
          \\"value\\": \\"'timed'\\",
          \\"computed\\": false
        }]
      },
      \\"required\\": false,
      \\"description\\": \\"\\"
    },
    \\"type\\": {
      \\"defaultValue\\": {
        \\"value\\": \\"'warning'\\",
        \\"computed\\": false
      },
      \\"type\\": {
        \\"name\\": \\"enum\\",
        \\"value\\": [{
          \\"value\\": \\"'success'\\",
          \\"computed\\": false
        }, {
          \\"value\\": \\"'warning'\\",
          \\"computed\\": false
        }, {
          \\"value\\": \\"'error'\\",
          \\"computed\\": false
        }, {
          \\"value\\": \\"'primary'\\",
          \\"computed\\": false
        }]
      },
      \\"required\\": false,
      \\"description\\": \\"\\"
    },
    \\"message\\": {
      \\"type\\": {
        \\"name\\": \\"string\\"
      },
      \\"required\\": true,
      \\"description\\": \\"\\"
    },
    \\"blank\\": {
      \\"type\\": {
        \\"name\\": \\"bool\\"
      },
      \\"required\\": false,
      \\"description\\": \\"No background or border if static alert\\"
    },
    \\"icon\\": {
      \\"type\\": {
        \\"name\\": \\"string\\"
      },
      \\"required\\": false,
      \\"description\\": \\"Allows icon override, accepts material icon name\\"
    }
  }
};"
`;