|
10 | 10 | import React from 'react';
|
11 | 11 | import PropTypes from 'prop-types';
|
12 | 12 |
|
13 |
| -import AU from '@gov.au/animate'; // interdependency with our animate lib |
| 13 | +// import AU from '@gov.au/animate'; // interdependency with our animate lib |
14 | 14 |
|
15 | 15 |
|
16 | 16 | // The following line will be replaced automatically with generic imports for the ES5 pipeline.
|
@@ -350,7 +350,7 @@ class AUaccordion extends React.PureComponent {
|
350 | 350 | /**
|
351 | 351 | * Toggle an accordion on click
|
352 | 352 | *
|
353 |
| - * @param {event object} event - The event object of the click |
| 353 | + * @param {object} event - The event object of the click |
354 | 354 | */
|
355 | 355 | toggle( event ) {
|
356 | 356 | event.preventDefault();
|
@@ -391,16 +391,38 @@ class AUaccordion extends React.PureComponent {
|
391 | 391 | };
|
392 | 392 |
|
393 | 393 | AUaccordion.propTypes = {
|
394 |
| - children: PropTypes.node.isRequired, |
| 394 | + /** |
| 395 | + * The headline of the accordion |
| 396 | + */ |
395 | 397 | header: PropTypes.string.isRequired,
|
| 398 | + /** |
| 399 | + * Closed state, optional |
| 400 | + */ |
396 | 401 | closed: PropTypes.bool,
|
| 402 | + /** |
| 403 | + * Speed of the animation in ms, optional |
| 404 | + */ |
397 | 405 | speed: PropTypes.number,
|
| 406 | + /** |
| 407 | + * A dark variation of the component |
| 408 | + */ |
398 | 409 | dark: PropTypes.bool,
|
| 410 | + /** |
| 411 | + * A function executed when the accordion opens, optional |
| 412 | + */ |
399 | 413 | onOpen: PropTypes.func,
|
| 414 | + /** |
| 415 | + * A function executed after the accordion opened, optional |
| 416 | + */ |
400 | 417 | afterOpen: PropTypes.func,
|
| 418 | + /** |
| 419 | + * A function executed when the accordion closes, optional |
| 420 | + */ |
401 | 421 | onClose: PropTypes.func,
|
| 422 | + /** |
| 423 | + * A function executed when the accordion closes, optional |
| 424 | + */ |
402 | 425 | afterClose: PropTypes.func,
|
403 |
| - className: PropTypes.string, |
404 | 426 | };
|
405 | 427 |
|
406 | 428 | AUaccordion.defaultProps = {
|
|
0 commit comments