diff --git a/src/components/layouts/core/BaseLayout/BaseLayout.jsx b/src/components/layouts/core/BaseLayout/BaseLayout.jsx new file mode 100644 index 00000000..46e753d4 --- /dev/null +++ b/src/components/layouts/core/BaseLayout/BaseLayout.jsx @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2018-present Arctic Ice Studio + * Copyright (C) 2018-present Sven Greb + * + * Project: Nord Docs + * Repository: https://github.com/arcticicestudio/nord-docs + * License: MIT + */ + +import React, { Fragment } from "react"; +import PropTypes from "prop-types"; + +import Page from "containers/core/Page"; +import Root from "containers/core/Root"; + +/** + * The base page layout providing the main container that wraps the content. + * + * @since 0.3.0 + */ +const BaseLayout = ({ children }) => ( + + + {children} + + +); + +BaseLayout.propTypes = { + children: PropTypes.node.isRequired +}; + +export default BaseLayout; diff --git a/src/components/layouts/core/BaseLayout/index.js b/src/components/layouts/core/BaseLayout/index.js new file mode 100644 index 00000000..cd391add --- /dev/null +++ b/src/components/layouts/core/BaseLayout/index.js @@ -0,0 +1 @@ +export { default } from "./BaseLayout"; diff --git a/test/components/layouts/core/BaseLayout/BaseLayout.test.jsx b/test/components/layouts/core/BaseLayout/BaseLayout.test.jsx new file mode 100644 index 00000000..0632f6be --- /dev/null +++ b/test/components/layouts/core/BaseLayout/BaseLayout.test.jsx @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2018-present Arctic Ice Studio + * Copyright (C) 2018-present Sven Greb + * + * Project: Nord Docs + * Repository: https://github.com/arcticicestudio/nord-docs + * License: MIT + */ + +import React, { Fragment } from "react"; +import { render } from "react-testing-library"; + +import BaseLayout from "layouts/core/BaseLayout"; + +test("snapshot", () => { + const { container } = render( + + + + ); + expect(container).toMatchSnapshot(); +}); diff --git a/test/components/layouts/core/BaseLayout/__snapshots__/BaseLayout.test.jsx.snap b/test/components/layouts/core/BaseLayout/__snapshots__/BaseLayout.test.jsx.snap new file mode 100644 index 00000000..3a2e181c --- /dev/null +++ b/test/components/layouts/core/BaseLayout/__snapshots__/BaseLayout.test.jsx.snap @@ -0,0 +1,9 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`snapshot 1`] = ` +
+
+
+`;