Updated ErrorPopover, LoadingPopover styles to match all other popovers
• Updated: - ErrorPopover, LoadingPopover styles to match all other popovers
This commit is contained in:
parent
043fc01cea
commit
78838ff241
@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user