You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38Lines changed: 38 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -270,10 +270,48 @@ directory.
270
270
```
271
271
272
272
In the example you can also see another convenient properties:
273
+
-`pluginName` - plugin name;
273
274
-`actions` - the html-reporter **Redux** actions;
274
275
-`selectors` - the memoized html-reporter selectors which created using **reselect** library
275
276
-`pluginConfig` - plugin configuration.
276
277
278
+
Available dependencies:
279
+
-`react`
280
+
-`redux`
281
+
-`react-redux`
282
+
-`lodash`
283
+
-`prop-types`
284
+
-`classnames`
285
+
-`semantic-ui-react`
286
+
-`react-markdown`
287
+
-`reduce-reducers`
288
+
-`immer`
289
+
-`reselect`
290
+
-`axios`
291
+
292
+
Available components:
293
+
-`components`
294
+
-`<Details />` - component which allows users to toggle the display of content.
295
+
Example of usage:
296
+
```js
297
+
// ... inside your react component
298
+
render() {
299
+
return<Details
300
+
title='Some title'
301
+
content='Some content'// content that will appear when you click on the title
302
+
extendClassNames='some_class_name'// ability to add own css-classes to component
303
+
onClick={() =>console.log('clicked')} // ability to add handler
304
+
/>
305
+
}
306
+
```
307
+
308
+
, where:
309
+
310
+
***title** (required) `String|JSX.Element`- title that describes information hidden underneath.
311
+
***content** (required) `Function|String|Array<String>|JSX.Element`- content that will appear after click on the title.
312
+
***extendClassNames** (optional) `String|Array<String>`- ability to add own css classes to the component.
313
+
***onClick** (optional) `Function`- handler that will be called when the title is clicked.
314
+
277
315
#### Extension points
278
316
279
317
Extension points - places within the report UI that are available to extend with React components with the help of [html-reporter plugins](#html-reporter-plugins).
0 commit comments