diff --git a/app/src/layouts/appLayout/appLayout.jsx b/app/src/layouts/appLayout/appLayout.jsx index 40729b143e..deaa55300d 100644 --- a/app/src/layouts/appLayout/appLayout.jsx +++ b/app/src/layouts/appLayout/appLayout.jsx @@ -22,8 +22,13 @@ import { AppHeader } from './appHeader'; import { AppSidebar } from './appSidebar'; import { DemoBanner } from './demoBanner'; -const AppLayoutComponent = ({ children, isDemoInstance }) => ( - +const AppLayoutComponent = ({ children, isDemoInstance, rawContent }) => ( + {children} ); @@ -31,10 +36,12 @@ const AppLayoutComponent = ({ children, isDemoInstance }) => ( AppLayoutComponent.propTypes = { children: PropTypes.node, isDemoInstance: PropTypes.bool, + rawContent: PropTypes.bool, }; AppLayoutComponent.defaultProps = { children: null, isDemoInstance: false, + rawContent: false, }; export const AppLayout = connect((state) => ({ diff --git a/app/src/layouts/appLayout/rawContentAppLayout/index.js b/app/src/layouts/appLayout/rawContentAppLayout/index.js new file mode 100644 index 0000000000..df581e7f55 --- /dev/null +++ b/app/src/layouts/appLayout/rawContentAppLayout/index.js @@ -0,0 +1,17 @@ +/* + * Copyright 2022 EPAM Systems + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { RawContentAppLayout } from './rawContentAppLayout'; diff --git a/app/src/layouts/appLayout/rawContentAppLayout/rawContentAppLayout.jsx b/app/src/layouts/appLayout/rawContentAppLayout/rawContentAppLayout.jsx new file mode 100644 index 0000000000..82af7b8645 --- /dev/null +++ b/app/src/layouts/appLayout/rawContentAppLayout/rawContentAppLayout.jsx @@ -0,0 +1,20 @@ +/* + * Copyright 2022 EPAM Systems + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import React from 'react'; +import { AppLayout } from '../appLayout'; + +export const RawContentAppLayout = (props) => ; diff --git a/app/src/layouts/common/layout/layout.jsx b/app/src/layouts/common/layout/layout.jsx index 4aebc4c242..f5e0df2ae7 100644 --- a/app/src/layouts/common/layout/layout.jsx +++ b/app/src/layouts/common/layout/layout.jsx @@ -28,12 +28,14 @@ export class Layout extends Component { Banner: PropTypes.elementType, Header: PropTypes.elementType, Sidebar: PropTypes.elementType, + rawContent: PropTypes.bool, }; static defaultProps = { children: null, Banner: null, Header: null, Sidebar: null, + rawContent: false, }; state = { @@ -79,7 +81,18 @@ export class Layout extends Component { }; render() { - const { Header, Sidebar, Banner } = this.props; + const { Header, Sidebar, Banner, rawContent, children } = this.props; + const header = ( +
+ {Header && ( +
+ )} +
+ ); + return (
@@ -95,24 +108,24 @@ export class Layout extends Component {
{Banner && } - -
-
- {Header && ( -
- )} + {rawContent ? ( + <> + {header} + {children} + + ) : ( + +
+ {header} +
{children}
-
{this.props.children}
-
- + + )}
( +
+
{navigation}
+
{children}
+
+); + +SettingsLayout.propTypes = { + navigation: PropTypes.node, + header: PropTypes.node, + children: PropTypes.node, +}; +SettingsLayout.defaultProps = { + navigation: null, + header: null, + children: null, +}; diff --git a/app/src/layouts/settingsLayout/settingsLayout.scss b/app/src/layouts/settingsLayout/settingsLayout.scss new file mode 100644 index 0000000000..ce4773f160 --- /dev/null +++ b/app/src/layouts/settingsLayout/settingsLayout.scss @@ -0,0 +1,33 @@ +/*! + * Copyright 2022 EPAM Systems + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +.container { + display: flex; + height: 100%; + background: $COLOR--bg-000; +} + +.navigation { + flex-shrink: 0; + width: 353px; + border-right: 1px solid $COLOR--e-100; + box-sizing: border-box; +} + +.section { + width: 100%; + background: $COLOR--bg-100; +}