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 f749cbe commit 123f7cd
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 @@ -22,7 +22,7 @@ export interface ButtonProps {
animated?: '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 @@ -42,8 +42,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 123f7cd

Please sign in to comment.