Skip to content

Commit

Permalink
Add comment to explain role of nonVoidPropTypes in KuiButton.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcenizal committed Mar 28, 2017
1 parent d50d081 commit f9c55fa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ui_framework/components/button/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ const commonPropTypes = {
className: PropTypes.string,
};

// KuiSubmitButton is an `input` element, which is a void element and can't contain children. But
// the regular KuiButton and KuiLink button are non-void elements, so they can contain children.
// These propTypes will only apply to these components.
const nonVoidPropTypes = {
icon: PropTypes.node,
iconPosition: PropTypes.oneOf([
Expand Down

0 comments on commit f9c55fa

Please sign in to comment.