2020-02-28 15:20:47 +00:00
|
|
|
import Block from '../block'
|
|
|
|
|
|
|
|
export default class PopoverLayout extends PureComponent {
|
2020-03-24 04:39:12 +00:00
|
|
|
static propTypes = {
|
|
|
|
children: PropTypes.node,
|
|
|
|
className: PropTypes.string,
|
2020-04-07 02:53:23 +01:00
|
|
|
width: PropTypes.number,
|
|
|
|
}
|
|
|
|
|
|
|
|
static defaultProps = {
|
|
|
|
width: 250,
|
2020-03-24 04:39:12 +00:00
|
|
|
}
|
|
|
|
|
2020-02-19 23:57:07 +00:00
|
|
|
render() {
|
2020-04-07 02:53:23 +01:00
|
|
|
const { children, className, width } = this.props
|
2020-02-28 15:20:47 +00:00
|
|
|
|
2020-02-19 23:57:07 +00:00
|
|
|
return (
|
2020-04-07 02:53:23 +01:00
|
|
|
<div className={className} style={{width: `${width}px`}}>
|
2020-02-28 15:20:47 +00:00
|
|
|
<Block>
|
|
|
|
{children}
|
|
|
|
</Block>
|
2020-02-19 23:57:07 +00:00
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|