From 78838ff241e370facb3fdbed290d14f53bcced35 Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Fri, 24 Jul 2020 19:06:21 -0500 Subject: [PATCH] Updated ErrorPopover, LoadingPopover styles to match all other popovers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Updated: - ErrorPopover, LoadingPopover styles to match all other popovers --- .../components/popover/error_popover.js | 21 +++++++++++------ .../components/popover/loading_popover.js | 23 ++++++++++++------- .../components/popover/popover_root.js | 10 ++++++-- 3 files changed, 37 insertions(+), 17 deletions(-) diff --git a/app/javascript/gabsocial/components/popover/error_popover.js b/app/javascript/gabsocial/components/popover/error_popover.js index 96b0b146..bddb62a7 100644 --- a/app/javascript/gabsocial/components/popover/error_popover.js +++ b/app/javascript/gabsocial/components/popover/error_popover.js @@ -1,21 +1,28 @@ -import Block from '../block' +import PopoverLayout from './popover_layout' import ColumnIndicator from '../column_indicator' export default class ErrorPopover extends PureComponent { + static defaultProps = { + isXS: PropTypes.bool, + onClose: PropTypes.func, + } + render() { + const { isXS } = this.props + return ( -
- +
- -
-
-
+ ) } diff --git a/app/javascript/gabsocial/components/popover/loading_popover.js b/app/javascript/gabsocial/components/popover/loading_popover.js index 509fa6ba..9cbc1927 100644 --- a/app/javascript/gabsocial/components/popover/loading_popover.js +++ b/app/javascript/gabsocial/components/popover/loading_popover.js @@ -1,22 +1,29 @@ -import Block from '../block' +import PopoverLayout from './popover_layout' import ColumnIndicator from '../column_indicator' export default class LoadingPopover extends PureComponent { + static defaultProps = { + isXS: PropTypes.bool, + onClose: PropTypes.func, + } + render() { + const { isXS } = this.props + return ( -
- +
- -
-
-
+ ) } -} \ No newline at end of file +} diff --git a/app/javascript/gabsocial/components/popover/popover_root.js b/app/javascript/gabsocial/components/popover/popover_root.js index 08d8de46..0af67f9b 100644 --- a/app/javascript/gabsocial/components/popover/popover_root.js +++ b/app/javascript/gabsocial/components/popover/popover_root.js @@ -108,11 +108,17 @@ class PopoverRoot extends PureComponent { } renderLoading = () => { - return + const { width } = this.state + const isXS = width <= BREAKPOINT_EXTRA_SMALL + + return } renderError = () => { - return + const { width } = this.state + const isXS = width <= BREAKPOINT_EXTRA_SMALL + + return } render() {