UNPKG

1.47 kBJavaScriptView Raw
1import React from 'react';
2import { Source, SourceError } from './Source';
3export default {
4 title: 'Docs/Source',
5 component: Source
6};
7var jsxCode = "\n<MyComponent boolProp scalarProp={1} complexProp={{ foo: 1, bar: '2' }}>\n <SomeOtherComponent funcProp={(a) => a.id} />\n</MyComponent>\n";
8export var JSX = function JSX(args) {
9 return /*#__PURE__*/React.createElement(Source, args);
10};
11JSX.displayName = "JSX";
12JSX.args = {
13 code: jsxCode,
14 language: 'jsx',
15 format: false
16};
17var cssCode = "\n@-webkit-keyframes blinker {\n from { opacity: 1.0; }\n to { opacity: 0.0; }\n}\n\n.waitingForConnection {\n -webkit-animation-name: blinker;\n -webkit-animation-iteration-count: infinite;\n -webkit-animation-timing-function: cubic-bezier(.5, 0, 1, 1);\n -webkit-animation-duration: 1.7s;\n}\n";
18export var CSS = function CSS(args) {
19 return /*#__PURE__*/React.createElement(Source, args);
20};
21CSS.displayName = "CSS";
22CSS.args = {
23 code: cssCode,
24 language: 'css',
25 format: false
26};
27export var NoStory = function NoStory(args) {
28 return /*#__PURE__*/React.createElement(Source, args);
29};
30NoStory.displayName = "NoStory";
31NoStory.args = {
32 error: SourceError.NO_STORY,
33 format: false
34};
35export var SourceUnavailable = function SourceUnavailable(args) {
36 return /*#__PURE__*/React.createElement(Source, args);
37};
38SourceUnavailable.displayName = "SourceUnavailable";
39SourceUnavailable.args = {
40 error: SourceError.SOURCE_UNAVAILABLE,
41 format: false
42};
\No newline at end of file