Skip to content

Commit

Permalink
Add prop notes.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcenizal committed Apr 30, 2018
1 parent 3cde22c commit 8e72691
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/components/tabs/tabbed_content/tabbed_content.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,22 @@ const makeId = htmlIdGenerator();
export class EuiTabbedContent extends Component {
static propTypes = {
className: PropTypes.string,
// We use the id to associate tabs with panels for accessibility.

/**
* Each tab needs an id property, so we can associate it with its panel for accessibility
*/
tabs: PropTypes.arrayOf(PropTypes.shape({ id: PropTypes.string.isRequired })).isRequired,
onTabClick: PropTypes.func,

/**
* Use this prop if you want to control selection state within the owner component
*/
selectedTab: PropTypes.object,

/**
* Use this prop to set the initially selected tab while letting the tabbed content component
* control selection state internally
*/
initialSelectedTab: PropTypes.object,
size: PropTypes.oneOf(SIZES),
};
Expand Down

0 comments on commit 8e72691

Please sign in to comment.