@storybook/react 7.3.2 → 7.4.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/package.json +10 -9
  2. package/src/__test__/README.md +0 -3
  3. package/src/typings.d.ts +0 -48
  4. package/template/components/Button.jsx +0 -13
  5. package/template/components/Form.jsx +0 -36
  6. package/template/components/Html.jsx +0 -9
  7. package/template/components/Pre.jsx +0 -20
  8. package/template/stories/decorators.stories.tsx +0 -48
  9. package/template/stories/docgen-components/10017-ts-union/argTypes.snapshot +0 -36
  10. package/template/stories/docgen-components/10017-ts-union/docgen.snapshot +0 -34
  11. package/template/stories/docgen-components/10017-ts-union/input.tsx +0 -12
  12. package/template/stories/docgen-components/10017-ts-union/properties.snapshot +0 -32
  13. package/template/stories/docgen-components/10278-ts-multiple-components/argTypes.snapshot +0 -26
  14. package/template/stories/docgen-components/10278-ts-multiple-components/docgen.snapshot +0 -49
  15. package/template/stories/docgen-components/10278-ts-multiple-components/input.tsx +0 -27
  16. package/template/stories/docgen-components/10278-ts-multiple-components/properties.snapshot +0 -22
  17. package/template/stories/docgen-components/8140-js-prop-types-oneof/argTypes.snapshot +0 -127
  18. package/template/stories/docgen-components/8140-js-prop-types-oneof/docgen.snapshot +0 -97
  19. package/template/stories/docgen-components/8140-js-prop-types-oneof/input.jsx +0 -27
  20. package/template/stories/docgen-components/8140-js-prop-types-oneof/properties.snapshot +0 -89
  21. package/template/stories/docgen-components/8143-ts-imported-types/argTypes.snapshot +0 -27
  22. package/template/stories/docgen-components/8143-ts-imported-types/docgen.snapshot +0 -22
  23. package/template/stories/docgen-components/8143-ts-imported-types/input.tsx +0 -10
  24. package/template/stories/docgen-components/8143-ts-imported-types/properties.snapshot +0 -23
  25. package/template/stories/docgen-components/8143-ts-imported-types/types.ts +0 -3
  26. package/template/stories/docgen-components/8143-ts-react-fc-generics/argTypes.snapshot +0 -27
  27. package/template/stories/docgen-components/8143-ts-react-fc-generics/docgen.snapshot +0 -24
  28. package/template/stories/docgen-components/8143-ts-react-fc-generics/input.tsx +0 -10
  29. package/template/stories/docgen-components/8143-ts-react-fc-generics/properties.snapshot +0 -21
  30. package/template/stories/docgen-components/8428-js-static-prop-types/argTypes.snapshot +0 -25
  31. package/template/stories/docgen-components/8428-js-static-prop-types/docgen.snapshot +0 -39
  32. package/template/stories/docgen-components/8428-js-static-prop-types/input.jsx +0 -20
  33. package/template/stories/docgen-components/8428-js-static-prop-types/properties.snapshot +0 -21
  34. package/template/stories/docgen-components/8740-ts-multi-props/argTypes.snapshot +0 -27
  35. package/template/stories/docgen-components/8740-ts-multi-props/docgen.snapshot +0 -49
  36. package/template/stories/docgen-components/8740-ts-multi-props/input.tsx +0 -23
  37. package/template/stories/docgen-components/8740-ts-multi-props/properties.snapshot +0 -21
  38. package/template/stories/docgen-components/8894-9511-ts-forward-ref/argTypes.snapshot +0 -48
  39. package/template/stories/docgen-components/8894-9511-ts-forward-ref/docgen.snapshot +0 -39
  40. package/template/stories/docgen-components/8894-9511-ts-forward-ref/input.tsx +0 -31
  41. package/template/stories/docgen-components/8894-9511-ts-forward-ref/properties.snapshot +0 -34
  42. package/template/stories/docgen-components/9023-js-hoc/argTypes.snapshot +0 -89
  43. package/template/stories/docgen-components/9023-js-hoc/docgen.snapshot +0 -84
  44. package/template/stories/docgen-components/9023-js-hoc/input.jsx +0 -40
  45. package/template/stories/docgen-components/9023-js-hoc/properties.snapshot +0 -67
  46. package/template/stories/docgen-components/9399-js-proptypes-shape/argTypes.snapshot +0 -39
  47. package/template/stories/docgen-components/9399-js-proptypes-shape/docgen.snapshot +0 -48
  48. package/template/stories/docgen-components/9399-js-proptypes-shape/input.jsx +0 -16
  49. package/template/stories/docgen-components/9399-js-proptypes-shape/properties.snapshot +0 -35
  50. package/template/stories/docgen-components/9465-ts-type-props/argTypes.snapshot +0 -28
  51. package/template/stories/docgen-components/9465-ts-type-props/docgen.snapshot +0 -33
  52. package/template/stories/docgen-components/9465-ts-type-props/input.tsx +0 -12
  53. package/template/stories/docgen-components/9465-ts-type-props/properties.snapshot +0 -24
  54. package/template/stories/docgen-components/9493-ts-display-name/argTypes.snapshot +0 -62
  55. package/template/stories/docgen-components/9493-ts-display-name/docgen.snapshot +0 -50
  56. package/template/stories/docgen-components/9493-ts-display-name/input.tsx +0 -30
  57. package/template/stories/docgen-components/9493-ts-display-name/properties.snapshot +0 -52
  58. package/template/stories/docgen-components/9556-ts-react-default-exports/argTypes.snapshot +0 -28
  59. package/template/stories/docgen-components/9556-ts-react-default-exports/docgen.snapshot +0 -32
  60. package/template/stories/docgen-components/9556-ts-react-default-exports/input.tsx +0 -12
  61. package/template/stories/docgen-components/9556-ts-react-default-exports/properties.snapshot +0 -24
  62. package/template/stories/docgen-components/9575-ts-camel-case/argTypes.snapshot +0 -28
  63. package/template/stories/docgen-components/9575-ts-camel-case/docgen.snapshot +0 -38
  64. package/template/stories/docgen-components/9575-ts-camel-case/input.tsx +0 -26
  65. package/template/stories/docgen-components/9575-ts-camel-case/properties.snapshot +0 -24
  66. package/template/stories/docgen-components/9586-js-react-memo/argTypes.snapshot +0 -41
  67. package/template/stories/docgen-components/9586-js-react-memo/docgen.snapshot +0 -42
  68. package/template/stories/docgen-components/9586-js-react-memo/input.jsx +0 -15
  69. package/template/stories/docgen-components/9586-js-react-memo/properties.snapshot +0 -34
  70. package/template/stories/docgen-components/9591-ts-import-types/Bar.tsx +0 -3
  71. package/template/stories/docgen-components/9591-ts-import-types/argTypes.snapshot +0 -25
  72. package/template/stories/docgen-components/9591-ts-import-types/docgen.snapshot +0 -21
  73. package/template/stories/docgen-components/9591-ts-import-types/input.tsx +0 -10
  74. package/template/stories/docgen-components/9591-ts-import-types/properties.snapshot +0 -21
  75. package/template/stories/docgen-components/9626-js-default-values/argTypes.snapshot +0 -27
  76. package/template/stories/docgen-components/9626-js-default-values/docgen.snapshot +0 -25
  77. package/template/stories/docgen-components/9626-js-default-values/input.jsx +0 -5
  78. package/template/stories/docgen-components/9626-js-default-values/properties.snapshot +0 -21
  79. package/template/stories/docgen-components/9668-js-proptypes-no-jsdoc/argTypes.snapshot +0 -42
  80. package/template/stories/docgen-components/9668-js-proptypes-no-jsdoc/docgen.snapshot +0 -36
  81. package/template/stories/docgen-components/9668-js-proptypes-no-jsdoc/input.jsx +0 -13
  82. package/template/stories/docgen-components/9668-js-proptypes-no-jsdoc/properties.snapshot +0 -35
  83. package/template/stories/docgen-components/9721-ts-deprecated-jsdoc/argTypes.snapshot +0 -34
  84. package/template/stories/docgen-components/9721-ts-deprecated-jsdoc/docgen.snapshot +0 -38
  85. package/template/stories/docgen-components/9721-ts-deprecated-jsdoc/input.tsx +0 -12
  86. package/template/stories/docgen-components/9721-ts-deprecated-jsdoc/properties.snapshot +0 -30
  87. package/template/stories/docgen-components/9764-ts-extend-props/argTypes.snapshot +0 -72
  88. package/template/stories/docgen-components/9764-ts-extend-props/docgen.snapshot +0 -41
  89. package/template/stories/docgen-components/9764-ts-extend-props/input.tsx +0 -17
  90. package/template/stories/docgen-components/9764-ts-extend-props/properties.snapshot +0 -56
  91. package/template/stories/docgen-components/9827-ts-default-values/argTypes.snapshot +0 -72
  92. package/template/stories/docgen-components/9827-ts-default-values/docgen.snapshot +0 -52
  93. package/template/stories/docgen-components/9827-ts-default-values/input.tsx +0 -17
  94. package/template/stories/docgen-components/9827-ts-default-values/properties.snapshot +0 -56
  95. package/template/stories/docgen-components/9832-ts-enum-export/argTypes.snapshot +0 -3
  96. package/template/stories/docgen-components/9832-ts-enum-export/docgen.snapshot +0 -16
  97. package/template/stories/docgen-components/9832-ts-enum-export/input.tsx +0 -8
  98. package/template/stories/docgen-components/9832-ts-enum-export/properties.snapshot +0 -7
  99. package/template/stories/docgen-components/9922-ts-component-props/argTypes.snapshot +0 -25
  100. package/template/stories/docgen-components/9922-ts-component-props/docgen.snapshot +0 -35
  101. package/template/stories/docgen-components/9922-ts-component-props/input.tsx +0 -24
  102. package/template/stories/docgen-components/9922-ts-component-props/properties.snapshot +0 -21
  103. package/template/stories/docgen-components/js-class-component/argTypes.snapshot +0 -386
  104. package/template/stories/docgen-components/js-class-component/docgen.snapshot +0 -252
  105. package/template/stories/docgen-components/js-class-component/input.jsx +0 -57
  106. package/template/stories/docgen-components/js-class-component/properties.snapshot +0 -286
  107. package/template/stories/docgen-components/js-function-component/argTypes.snapshot +0 -386
  108. package/template/stories/docgen-components/js-function-component/docgen.snapshot +0 -236
  109. package/template/stories/docgen-components/js-function-component/input.jsx +0 -50
  110. package/template/stories/docgen-components/js-function-component/properties.snapshot +0 -286
  111. package/template/stories/docgen-components/js-function-component-inline-defaults/argTypes.snapshot +0 -386
  112. package/template/stories/docgen-components/js-function-component-inline-defaults/docgen.snapshot +0 -247
  113. package/template/stories/docgen-components/js-function-component-inline-defaults/input.jsx +0 -65
  114. package/template/stories/docgen-components/js-function-component-inline-defaults/properties.snapshot +0 -286
  115. package/template/stories/docgen-components/js-function-component-inline-defaults-no-propTypes/argTypes.snapshot +0 -237
  116. package/template/stories/docgen-components/js-function-component-inline-defaults-no-propTypes/docgen.snapshot +0 -124
  117. package/template/stories/docgen-components/js-function-component-inline-defaults-no-propTypes/input.jsx +0 -41
  118. package/template/stories/docgen-components/js-function-component-inline-defaults-no-propTypes/properties.snapshot +0 -151
  119. package/template/stories/docgen-components/js-proptypes/docgen.snapshot +0 -1770
  120. package/template/stories/docgen-components/js-proptypes/input.jsx +0 -497
  121. package/template/stories/docgen-components/jsdoc/argTypes.snapshot +0 -1129
  122. package/template/stories/docgen-components/jsdoc/docgen.snapshot +0 -548
  123. package/template/stories/docgen-components/jsdoc/input.jsx +0 -231
  124. package/template/stories/docgen-components/jsdoc/properties.snapshot +0 -1017
  125. package/template/stories/docgen-components/ts-function-component/argTypes.snapshot +0 -396
  126. package/template/stories/docgen-components/ts-function-component/docgen.snapshot +0 -241
  127. package/template/stories/docgen-components/ts-function-component/input.tsx +0 -52
  128. package/template/stories/docgen-components/ts-function-component/properties.snapshot +0 -296
  129. package/template/stories/docgen-components/ts-function-component-inline-defaults/argTypes.snapshot +0 -279
  130. package/template/stories/docgen-components/ts-function-component-inline-defaults/docgen.snapshot +0 -151
  131. package/template/stories/docgen-components/ts-function-component-inline-defaults/input.tsx +0 -80
  132. package/template/stories/docgen-components/ts-function-component-inline-defaults/properties.snapshot +0 -177
  133. package/template/stories/docgen-components/ts-html/argTypes.snapshot +0 -3
  134. package/template/stories/docgen-components/ts-html/docgen.snapshot +0 -12
  135. package/template/stories/docgen-components/ts-html/input.tsx +0 -12
  136. package/template/stories/docgen-components/ts-html/properties.snapshot +0 -7
  137. package/template/stories/docgen-components/ts-jsdoc/argTypes.snapshot +0 -3
  138. package/template/stories/docgen-components/ts-jsdoc/docgen.snapshot +0 -21
  139. package/template/stories/docgen-components/ts-jsdoc/input.tsx +0 -27
  140. package/template/stories/docgen-components/ts-jsdoc/properties.snapshot +0 -7
  141. package/template/stories/docgen-components/ts-types/argTypes.snapshot +0 -656
  142. package/template/stories/docgen-components/ts-types/docgen.snapshot +0 -317
  143. package/template/stories/docgen-components/ts-types/input.tsx +0 -130
  144. package/template/stories/docgen-components/ts-types/properties.snapshot +0 -410
  145. package/template/stories/errors.stories.tsx +0 -37
  146. package/template/stories/hooks.stories.tsx +0 -17
  147. package/template/stories/js-argtypes.stories.jsx +0 -91
  148. package/template/stories/react-mdx.stories.mdx +0 -26
  149. package/template/stories/teardown.stories.tsx +0 -23
  150. package/template/stories/ts-argtypes.stories.tsx +0 -104
@@ -1,237 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`react component properties js-function-component-inline-defaults-no-propTypes 1`] = `
4
- Object {
5
- "arrayOptional": Object {
6
- "control": Object {
7
- "type": "object",
8
- },
9
- "description": undefined,
10
- "name": "arrayOptional",
11
- "table": Object {
12
- "defaultValue": Object {
13
- "detail": undefined,
14
- "summary": "['array', 'optional']",
15
- },
16
- "jsDocTags": undefined,
17
- "type": Object {
18
- "detail": undefined,
19
- "summary": "unknown",
20
- },
21
- },
22
- "type": Object {
23
- "required": false,
24
- },
25
- },
26
- "booleanOptional": Object {
27
- "control": Object {
28
- "type": "object",
29
- },
30
- "description": undefined,
31
- "name": "booleanOptional",
32
- "table": Object {
33
- "defaultValue": Object {
34
- "detail": undefined,
35
- "summary": "false",
36
- },
37
- "jsDocTags": undefined,
38
- "type": Object {
39
- "detail": undefined,
40
- "summary": "unknown",
41
- },
42
- },
43
- "type": Object {
44
- "required": false,
45
- },
46
- },
47
- "dateOptional": Object {
48
- "control": Object {
49
- "type": "object",
50
- },
51
- "description": undefined,
52
- "name": "dateOptional",
53
- "table": Object {
54
- "defaultValue": Object {
55
- "detail": undefined,
56
- "summary": "new Date('20 Jan 1983')",
57
- },
58
- "jsDocTags": undefined,
59
- "type": Object {
60
- "detail": undefined,
61
- "summary": "unknown",
62
- },
63
- },
64
- "type": Object {
65
- "required": false,
66
- },
67
- },
68
- "functionOptional": Object {
69
- "control": Object {
70
- "type": "object",
71
- },
72
- "description": undefined,
73
- "name": "functionOptional",
74
- "table": Object {
75
- "defaultValue": Object {
76
- "detail": undefined,
77
- "summary": "() => 'foo'",
78
- },
79
- "jsDocTags": undefined,
80
- "type": Object {
81
- "detail": undefined,
82
- "summary": "unknown",
83
- },
84
- },
85
- "type": Object {
86
- "required": false,
87
- },
88
- },
89
- "globalReference": Object {
90
- "control": Object {
91
- "type": "object",
92
- },
93
- "description": undefined,
94
- "name": "globalReference",
95
- "table": Object {
96
- "defaultValue": Object {
97
- "detail": undefined,
98
- "summary": "Date",
99
- },
100
- "jsDocTags": undefined,
101
- "type": Object {
102
- "detail": undefined,
103
- "summary": "unknown",
104
- },
105
- },
106
- "type": Object {
107
- "required": false,
108
- },
109
- },
110
- "importedReference": Object {
111
- "control": Object {
112
- "type": "object",
113
- },
114
- "description": undefined,
115
- "name": "importedReference",
116
- "table": Object {
117
- "defaultValue": Object {
118
- "detail": undefined,
119
- "summary": "imported",
120
- },
121
- "jsDocTags": undefined,
122
- "type": Object {
123
- "detail": undefined,
124
- "summary": "unknown",
125
- },
126
- },
127
- "type": Object {
128
- "required": false,
129
- },
130
- },
131
- "localReference": Object {
132
- "control": Object {
133
- "type": "object",
134
- },
135
- "description": undefined,
136
- "name": "localReference",
137
- "table": Object {
138
- "defaultValue": Object {
139
- "detail": undefined,
140
- "summary": "'local-value'",
141
- },
142
- "jsDocTags": undefined,
143
- "type": Object {
144
- "detail": undefined,
145
- "summary": "unknown",
146
- },
147
- },
148
- "type": Object {
149
- "required": false,
150
- },
151
- },
152
- "numberOptional": Object {
153
- "control": Object {
154
- "type": "object",
155
- },
156
- "description": undefined,
157
- "name": "numberOptional",
158
- "table": Object {
159
- "defaultValue": Object {
160
- "detail": undefined,
161
- "summary": "1",
162
- },
163
- "jsDocTags": undefined,
164
- "type": Object {
165
- "detail": undefined,
166
- "summary": "unknown",
167
- },
168
- },
169
- "type": Object {
170
- "required": false,
171
- },
172
- },
173
- "objectOptional": Object {
174
- "control": Object {
175
- "type": "object",
176
- },
177
- "description": undefined,
178
- "name": "objectOptional",
179
- "table": Object {
180
- "defaultValue": Object {
181
- "detail": undefined,
182
- "summary": "{ object: 'optional' }",
183
- },
184
- "jsDocTags": undefined,
185
- "type": Object {
186
- "detail": undefined,
187
- "summary": "unknown",
188
- },
189
- },
190
- "type": Object {
191
- "required": false,
192
- },
193
- },
194
- "stringGlobalName": Object {
195
- "control": Object {
196
- "type": "object",
197
- },
198
- "description": undefined,
199
- "name": "stringGlobalName",
200
- "table": Object {
201
- "defaultValue": Object {
202
- "detail": undefined,
203
- "summary": "'top'",
204
- },
205
- "jsDocTags": undefined,
206
- "type": Object {
207
- "detail": undefined,
208
- "summary": "unknown",
209
- },
210
- },
211
- "type": Object {
212
- "required": false,
213
- },
214
- },
215
- "stringOptional": Object {
216
- "control": Object {
217
- "type": "object",
218
- },
219
- "description": undefined,
220
- "name": "stringOptional",
221
- "table": Object {
222
- "defaultValue": Object {
223
- "detail": undefined,
224
- "summary": "'stringOptional'",
225
- },
226
- "jsDocTags": undefined,
227
- "type": Object {
228
- "detail": undefined,
229
- "summary": "unknown",
230
- },
231
- },
232
- "type": Object {
233
- "required": false,
234
- },
235
- },
236
- }
237
- `;
@@ -1,124 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`react component properties js-function-component-inline-defaults-no-propTypes 1`] = `
4
- "/* eslint-disable react/prop-types */
5
- import React from 'react';
6
- import { imported } from '../imported';
7
- const local = 'local-value';
8
- /**
9
- * A component that renders its props
10
- */
11
-
12
- export const PropsWriter = ({
13
- numberOptional = 1,
14
- stringOptional = 'stringOptional',
15
- booleanOptional = false,
16
- arrayOptional = ['array', 'optional'],
17
- objectOptional = {
18
- object: 'optional'
19
- },
20
- functionOptional = () => 'foo',
21
- dateOptional = new Date('20 Jan 1983'),
22
- localReference = local,
23
- importedReference = imported,
24
- globalReference = Date,
25
- stringGlobalName = 'top'
26
- }) => /*#__PURE__*/React.createElement(\\"pre\\", null, JSON.stringify({
27
- numberOptional,
28
- stringOptional,
29
- booleanOptional,
30
- arrayOptional,
31
- objectOptional,
32
- functionOptional,
33
- dateOptional,
34
- localReference,
35
- importedReference,
36
- globalReference,
37
- stringGlobalName
38
- }));
39
- export const component = PropsWriter;
40
- PropsWriter.__docgenInfo = {
41
- \\"description\\": \\"A component that renders its props\\",
42
- \\"methods\\": [],
43
- \\"displayName\\": \\"PropsWriter\\",
44
- \\"props\\": {
45
- \\"numberOptional\\": {
46
- \\"defaultValue\\": {
47
- \\"value\\": \\"1\\",
48
- \\"computed\\": false
49
- },
50
- \\"required\\": false
51
- },
52
- \\"stringOptional\\": {
53
- \\"defaultValue\\": {
54
- \\"value\\": \\"'stringOptional'\\",
55
- \\"computed\\": false
56
- },
57
- \\"required\\": false
58
- },
59
- \\"booleanOptional\\": {
60
- \\"defaultValue\\": {
61
- \\"value\\": \\"false\\",
62
- \\"computed\\": false
63
- },
64
- \\"required\\": false
65
- },
66
- \\"arrayOptional\\": {
67
- \\"defaultValue\\": {
68
- \\"value\\": \\"['array', 'optional']\\",
69
- \\"computed\\": false
70
- },
71
- \\"required\\": false
72
- },
73
- \\"objectOptional\\": {
74
- \\"defaultValue\\": {
75
- \\"value\\": \\"{ object: 'optional' }\\",
76
- \\"computed\\": false
77
- },
78
- \\"required\\": false
79
- },
80
- \\"functionOptional\\": {
81
- \\"defaultValue\\": {
82
- \\"value\\": \\"() => 'foo'\\",
83
- \\"computed\\": false
84
- },
85
- \\"required\\": false
86
- },
87
- \\"dateOptional\\": {
88
- \\"defaultValue\\": {
89
- \\"value\\": \\"new Date('20 Jan 1983')\\",
90
- \\"computed\\": false
91
- },
92
- \\"required\\": false
93
- },
94
- \\"localReference\\": {
95
- \\"defaultValue\\": {
96
- \\"value\\": \\"'local-value'\\",
97
- \\"computed\\": false
98
- },
99
- \\"required\\": false
100
- },
101
- \\"importedReference\\": {
102
- \\"defaultValue\\": {
103
- \\"value\\": \\"imported\\",
104
- \\"computed\\": true
105
- },
106
- \\"required\\": false
107
- },
108
- \\"globalReference\\": {
109
- \\"defaultValue\\": {
110
- \\"value\\": \\"Date\\",
111
- \\"computed\\": true
112
- },
113
- \\"required\\": false
114
- },
115
- \\"stringGlobalName\\": {
116
- \\"defaultValue\\": {
117
- \\"value\\": \\"'top'\\",
118
- \\"computed\\": false
119
- },
120
- \\"required\\": false
121
- }
122
- }
123
- };"
124
- `;
@@ -1,41 +0,0 @@
1
- /* eslint-disable react/prop-types */
2
- import React from 'react';
3
-
4
- import { imported } from '../imported';
5
-
6
- const local = 'local-value';
7
-
8
- /**
9
- * A component that renders its props
10
- */
11
- export const PropsWriter = ({
12
- numberOptional = 1,
13
- stringOptional = 'stringOptional',
14
- booleanOptional = false,
15
- arrayOptional = ['array', 'optional'],
16
- objectOptional = { object: 'optional' },
17
- functionOptional = () => 'foo',
18
- dateOptional = new Date('20 Jan 1983'),
19
- localReference = local,
20
- importedReference = imported,
21
- globalReference = Date,
22
- stringGlobalName = 'top',
23
- }) => (
24
- <pre>
25
- {JSON.stringify({
26
- numberOptional,
27
- stringOptional,
28
- booleanOptional,
29
- arrayOptional,
30
- objectOptional,
31
- functionOptional,
32
- dateOptional,
33
- localReference,
34
- importedReference,
35
- globalReference,
36
- stringGlobalName,
37
- })}
38
- </pre>
39
- );
40
-
41
- export const component = PropsWriter;
@@ -1,151 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`react component properties js-function-component-inline-defaults-no-propTypes 1`] = `
4
- Object {
5
- "rows": Array [
6
- Object {
7
- "defaultValue": Object {
8
- "detail": undefined,
9
- "summary": "1",
10
- },
11
- "description": undefined,
12
- "name": "numberOptional",
13
- "required": false,
14
- "type": Object {
15
- "detail": undefined,
16
- "summary": "unknown",
17
- },
18
- },
19
- Object {
20
- "defaultValue": Object {
21
- "detail": undefined,
22
- "summary": "'stringOptional'",
23
- },
24
- "description": undefined,
25
- "name": "stringOptional",
26
- "required": false,
27
- "type": Object {
28
- "detail": undefined,
29
- "summary": "unknown",
30
- },
31
- },
32
- Object {
33
- "defaultValue": Object {
34
- "detail": undefined,
35
- "summary": "false",
36
- },
37
- "description": undefined,
38
- "name": "booleanOptional",
39
- "required": false,
40
- "type": Object {
41
- "detail": undefined,
42
- "summary": "unknown",
43
- },
44
- },
45
- Object {
46
- "defaultValue": Object {
47
- "detail": undefined,
48
- "summary": "['array', 'optional']",
49
- },
50
- "description": undefined,
51
- "name": "arrayOptional",
52
- "required": false,
53
- "type": Object {
54
- "detail": undefined,
55
- "summary": "unknown",
56
- },
57
- },
58
- Object {
59
- "defaultValue": Object {
60
- "detail": undefined,
61
- "summary": "{ object: 'optional' }",
62
- },
63
- "description": undefined,
64
- "name": "objectOptional",
65
- "required": false,
66
- "type": Object {
67
- "detail": undefined,
68
- "summary": "unknown",
69
- },
70
- },
71
- Object {
72
- "defaultValue": Object {
73
- "detail": undefined,
74
- "summary": "() => 'foo'",
75
- },
76
- "description": undefined,
77
- "name": "functionOptional",
78
- "required": false,
79
- "type": Object {
80
- "detail": undefined,
81
- "summary": "unknown",
82
- },
83
- },
84
- Object {
85
- "defaultValue": Object {
86
- "detail": undefined,
87
- "summary": "new Date('20 Jan 1983')",
88
- },
89
- "description": undefined,
90
- "name": "dateOptional",
91
- "required": false,
92
- "type": Object {
93
- "detail": undefined,
94
- "summary": "unknown",
95
- },
96
- },
97
- Object {
98
- "defaultValue": Object {
99
- "detail": undefined,
100
- "summary": "'local-value'",
101
- },
102
- "description": undefined,
103
- "name": "localReference",
104
- "required": false,
105
- "type": Object {
106
- "detail": undefined,
107
- "summary": "unknown",
108
- },
109
- },
110
- Object {
111
- "defaultValue": Object {
112
- "detail": undefined,
113
- "summary": "imported",
114
- },
115
- "description": undefined,
116
- "name": "importedReference",
117
- "required": false,
118
- "type": Object {
119
- "detail": undefined,
120
- "summary": "unknown",
121
- },
122
- },
123
- Object {
124
- "defaultValue": Object {
125
- "detail": undefined,
126
- "summary": "Date",
127
- },
128
- "description": undefined,
129
- "name": "globalReference",
130
- "required": false,
131
- "type": Object {
132
- "detail": undefined,
133
- "summary": "unknown",
134
- },
135
- },
136
- Object {
137
- "defaultValue": Object {
138
- "detail": undefined,
139
- "summary": "'top'",
140
- },
141
- "description": undefined,
142
- "name": "stringGlobalName",
143
- "required": false,
144
- "type": Object {
145
- "detail": undefined,
146
- "summary": "unknown",
147
- },
148
- },
149
- ],
150
- }
151
- `;