Skip to content
This repository was archived by the owner on Aug 26, 2021. It is now read-only.

Commit 226a048

Browse files
author
Adam A. Zerella
committed
Generated react prop markdown table
Added desc to accordion.js props for testing
1 parent 1001a0d commit 226a048

File tree

7 files changed

+2515
-4
lines changed

7 files changed

+2515
-4
lines changed

components/accordion/src/js/react.js

+26-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import React from 'react';
1111
import PropTypes from 'prop-types';
1212

13-
import AU from '@gov.au/animate'; // interdependency with our animate lib
13+
// import AU from '@gov.au/animate'; // interdependency with our animate lib
1414

1515

1616
// The following line will be replaced automatically with generic imports for the ES5 pipeline.
@@ -350,7 +350,7 @@ class AUaccordion extends React.PureComponent {
350350
/**
351351
* Toggle an accordion on click
352352
*
353-
* @param {event object} event - The event object of the click
353+
* @param {object} event - The event object of the click
354354
*/
355355
toggle( event ) {
356356
event.preventDefault();
@@ -391,16 +391,38 @@ class AUaccordion extends React.PureComponent {
391391
};
392392

393393
AUaccordion.propTypes = {
394-
children: PropTypes.node.isRequired,
394+
/**
395+
* The headline of the accordion
396+
*/
395397
header: PropTypes.string.isRequired,
398+
/**
399+
* Closed state, optional
400+
*/
396401
closed: PropTypes.bool,
402+
/**
403+
* Speed of the animation in ms, optional
404+
*/
397405
speed: PropTypes.number,
406+
/**
407+
* A dark variation of the component
408+
*/
398409
dark: PropTypes.bool,
410+
/**
411+
* A function executed when the accordion opens, optional
412+
*/
399413
onOpen: PropTypes.func,
414+
/**
415+
* A function executed after the accordion opened, optional
416+
*/
400417
afterOpen: PropTypes.func,
418+
/**
419+
* A function executed when the accordion closes, optional
420+
*/
401421
onClose: PropTypes.func,
422+
/**
423+
* A function executed when the accordion closes, optional
424+
*/
402425
afterClose: PropTypes.func,
403-
className: PropTypes.string,
404426
};
405427

406428
AUaccordion.defaultProps = {

0 commit comments

Comments
 (0)