gab-social/app/javascript/gabsocial/pages/modal_page.js

50 lines
997 B
JavaScript
Raw Normal View History

import React from 'react'
import PropTypes from 'prop-types'
2020-04-11 23:29:19 +01:00
import PageTitle from '../features/ui/util/page_title'
import Block from '../components/block'
2020-03-05 15:44:17 +00:00
import DefaultLayout from '../layouts/default_layout'
import {
LinkFooter,
UserSuggestionsPanel,
} from '../features/ui/util/async_components'
2020-03-05 15:44:17 +00:00
class ModalPage extends React.PureComponent {
2020-03-05 15:44:17 +00:00
render() {
const {
children,
title,
page,
} = this.props
2020-03-05 15:44:17 +00:00
return (
<DefaultLayout
noComposeButton
2020-03-05 15:44:17 +00:00
title={title}
page={page}
showBackBtn
layout={[
UserSuggestionsPanel,
LinkFooter,
]}
2020-03-05 15:44:17 +00:00
>
2020-04-16 07:00:43 +01:00
<PageTitle path={title} />
<Block>
<div className={[_s.d, _s.py15, _s.px15].join(' ')}>
{children}
</div>
</Block>
2020-03-05 15:44:17 +00:00
</DefaultLayout>
)
}
}
ModalPage.propTypes = {
title: PropTypes.string,
page: PropTypes.string,
children: PropTypes.node,
}
export default ModalPage