Skip to content

Commit

Permalink
fix(Button): Add bool to propTypes of attached
Browse files Browse the repository at this point in the history
  • Loading branch information
kasbah committed Sep 22, 2017
1 parent e2fc8f5 commit 9b5e32d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/elements/Button/Button.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export interface ButtonProps {
animated?: boolean | 'fade' | 'vertical';

/** A button can be attached to the top or bottom of other content. */
attached?: 'left' | 'right' | 'top' | 'bottom';
attached?: boolean | 'left' | 'right' | 'top' | 'bottom';

/** A basic button is less pronounced. */
basic?: boolean;
Expand Down
7 changes: 5 additions & 2 deletions src/elements/Button/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,11 @@ class Button extends Component {
PropTypes.oneOf(['fade', 'vertical']),
]),

/** A button can be attached to the top or bottom of other content. */
attached: PropTypes.oneOf(['left', 'right', 'top', 'bottom']),
/** A button can be attached to other content. */
attached: PropTypes.oneOfType([
PropTypes.bool,
PropTypes.oneOf(['left', 'right', 'top', 'bottom']),
]),

/** A basic button is less pronounced. */
basic: PropTypes.bool,
Expand Down

0 comments on commit 9b5e32d

Please sign in to comment.