Add component common/Layout

Change-Id: Ifa35e9556d129db390df04fe935ca5f6cad5438d
This commit is contained in:
Manuel Stahl 2019-02-07 14:10:06 +01:00
parent f116bfe1f7
commit b6f6f7fb71
5 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,20 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { SidePanel } from './';
export default class Layout extends Component {
static propTypes = {
children: PropTypes.node,
};
render() {
return (
<div className="common-layout">
<SidePanel />
<div className="common-page-container">
{this.props.children}
</div>
</div>
);
}
}

View File

@ -0,0 +1,5 @@
@import '../../styles/mixins';
.common-layout {
padding-left: 260px;
}

View File

@ -1,2 +1,3 @@
export { default as PageNotFound } from './PageNotFound';
export { default as SidePanel } from './SidePanel';
export { default as Layout } from './Layout';

View File

@ -1,2 +1,3 @@
@import '../../styles/mixins';
@import './SidePanel';
@import './Layout';

View File

@ -0,0 +1,8 @@
import React from 'react';
import { shallow } from 'enzyme';
import { Layout } from '../../../src/features/common';
it('renders node with correct class name', () => {
const renderedComponent = shallow(<Layout />);
expect(renderedComponent.find('.common-layout').length).toBe(1);
});