From 9b5e32da7ae7ed74a88b2be0cade8b964d26de39 Mon Sep 17 00:00:00 2001 From: Kaspar Emanuel Date: Fri, 22 Sep 2017 21:16:30 +0100 Subject: [PATCH] fix(Button): Add bool to propTypes of attached fixes #2104 --- src/elements/Button/Button.d.ts | 2 +- src/elements/Button/Button.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/elements/Button/Button.d.ts b/src/elements/Button/Button.d.ts index 71d028e175..e84724e24e 100644 --- a/src/elements/Button/Button.d.ts +++ b/src/elements/Button/Button.d.ts @@ -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; diff --git a/src/elements/Button/Button.js b/src/elements/Button/Button.js index e12d3b6774..4056559092 100644 --- a/src/elements/Button/Button.js +++ b/src/elements/Button/Button.js @@ -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,