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

Commit

Permalink
Generated react prop markdown table
Browse files Browse the repository at this point in the history
Added desc to accordion.js props for testing
  • Loading branch information
Adam A. Zerella committed Feb 15, 2019
1 parent 1001a0d commit 226a048
Show file tree
Hide file tree
Showing 7 changed files with 2,515 additions and 4 deletions.
30 changes: 26 additions & 4 deletions components/accordion/src/js/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import React from 'react';
import PropTypes from 'prop-types';

import AU from '@gov.au/animate'; // interdependency with our animate lib
// import AU from '@gov.au/animate'; // interdependency with our animate lib


// The following line will be replaced automatically with generic imports for the ES5 pipeline.
Expand Down Expand Up @@ -350,7 +350,7 @@ class AUaccordion extends React.PureComponent {
/**
* Toggle an accordion on click
*
* @param {event object} event - The event object of the click
* @param {object} event - The event object of the click
*/
toggle( event ) {
event.preventDefault();
Expand Down Expand Up @@ -391,16 +391,38 @@ class AUaccordion extends React.PureComponent {
};

AUaccordion.propTypes = {
children: PropTypes.node.isRequired,
/**
* The headline of the accordion
*/
header: PropTypes.string.isRequired,
/**
* Closed state, optional
*/
closed: PropTypes.bool,
/**
* Speed of the animation in ms, optional
*/
speed: PropTypes.number,
/**
* A dark variation of the component
*/
dark: PropTypes.bool,
/**
* A function executed when the accordion opens, optional
*/
onOpen: PropTypes.func,
/**
* A function executed after the accordion opened, optional
*/
afterOpen: PropTypes.func,
/**
* A function executed when the accordion closes, optional
*/
onClose: PropTypes.func,
/**
* A function executed when the accordion closes, optional
*/
afterClose: PropTypes.func,
className: PropTypes.string,
};

AUaccordion.defaultProps = {
Expand Down
Loading

0 comments on commit 226a048

Please sign in to comment.