Skip to content

Commit

Permalink
Merge pull request react-bootstrap#1183 from insin/button-type-docs
Browse files Browse the repository at this point in the history
Document Button's default type attribute
  • Loading branch information
jquense committed Aug 20, 2015
2 parents 34784b4 + 9cd2db0 commit c73f458
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/generate-metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ function applyPropDoclets(props, propName){
if ( doclets.required) {
prop.required = true;
}

// Use @defaultValue to provide a prop's default value
if (doclets.defaultValue) {
prop.defaultValue = cleanDocletValue(doclets.defaultValue);
}
}


Expand Down
1 change: 1 addition & 0 deletions src/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const Button = React.createClass({
/**
* Defines HTML button type Attribute
* @type {("button"|"reset"|"submit")}
* @defaultValue 'button'
*/
type: React.PropTypes.oneOf(ButtonInput.types)
},
Expand Down

0 comments on commit c73f458

Please sign in to comment.