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