mirror of
https://github.com/maputnik/editor.git
synced 2026-01-21 12:50:02 +00:00
Adds lint to CI and fixes errors. I'm not sure I'm fully proud of all the solutions there. But there's no lint issues and the lint is being checked as part of the CI. --------- Co-authored-by: Yuri Astrakhan <yuriastrakhan@gmail.com>
47 lines
1.0 KiB
TypeScript
47 lines
1.0 KiB
TypeScript
import React from 'react'
|
|
import PropTypes from 'prop-types'
|
|
import ScrollContainer from './ScrollContainer'
|
|
|
|
type AppLayoutProps = {
|
|
toolbar: React.ReactElement
|
|
layerList: React.ReactElement
|
|
layerEditor?: React.ReactElement
|
|
map: React.ReactElement
|
|
bottom?: React.ReactElement
|
|
modals?: React.ReactNode
|
|
};
|
|
|
|
class AppLayout extends React.Component<AppLayoutProps> {
|
|
static childContextTypes = {
|
|
reactIconBase: PropTypes.object
|
|
}
|
|
|
|
getChildContext() {
|
|
return {
|
|
reactIconBase: { size: 14 }
|
|
}
|
|
}
|
|
|
|
render() {
|
|
return <div className="maputnik-layout">
|
|
{this.props.toolbar}
|
|
<div className="maputnik-layout-list">
|
|
{this.props.layerList}
|
|
</div>
|
|
<div className="maputnik-layout-drawer">
|
|
<ScrollContainer>
|
|
{this.props.layerEditor}
|
|
</ScrollContainer>
|
|
</div>
|
|
{this.props.map}
|
|
{this.props.bottom && <div className="maputnik-layout-bottom">
|
|
{this.props.bottom}
|
|
</div>
|
|
}
|
|
{this.props.modals}
|
|
</div>
|
|
}
|
|
}
|
|
|
|
export default AppLayout
|