Updated ErrorPopover, LoadingPopover styles to match all other popovers

• Updated:
- ErrorPopover, LoadingPopover styles to match all other popovers
This commit is contained in:
mgabdev 2020-07-24 19:06:21 -05:00
parent 043fc01cea
commit 78838ff241
3 changed files with 37 additions and 17 deletions

View File

@ -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 (
<div className={_s.width250PX}>
<Block>
<PopoverLayout
width={250}
isXS={isXS}
onClose={this.props.onClose}
>
<div className={[_s.default, _s.px15, _s.py15, _s.mt15, _s.mb15].join(' ')}>
<div className={[_s.default, _s.px15, _s.py15, _s.mt15, _s.mb15, _s.alignItemsCenter, _s.justifyContentCenter].join(' ')}>
<ColumnIndicator type='error' message='Error loading popover' />
</div>
</div>
</Block>
</div>
</PopoverLayout>
)
}

View File

@ -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 (
<div className={_s.width250PX}>
<Block>
<PopoverLayout
width={250}
isXS={isXS}
onClose={this.props.onClose}
>
<div className={[_s.default, _s.px15, _s.py15, _s.mt15, _s.mb15].join(' ')}>
<div className={[_s.default, _s.px15, _s.py15, _s.mt15, _s.mb15, _s.alignItemsCenter, _s.justifyContentCenter].join(' ')}>
<ColumnIndicator type='loading' />
</div>
</div>
</Block>
</div>
</PopoverLayout>
)
}
}
}

View File

@ -108,11 +108,17 @@ class PopoverRoot extends PureComponent {
}
renderLoading = () => {
return <LoadingPopover />
const { width } = this.state
const isXS = width <= BREAKPOINT_EXTRA_SMALL
return <LoadingPopover isXS={isXS} onClose={this.props.onClose} />
}
renderError = () => {
return <ErrorPopover />
const { width } = this.state
const isXS = width <= BREAKPOINT_EXTRA_SMALL
return <ErrorPopover isXS={isXS} onClose={this.props.onClose} />
}
render() {