Skip to content

Commit

Permalink
feat: Add page footer section
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanfredrik committed Oct 3, 2023
1 parent 08bc813 commit 8334c1f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/** @jsx jsx */
import { jsx, useTheme } from "@emotion/react";
import { MaybeFragment, useThemeProps } from "@wsui/base";

export default function PageFooter(props) {
// eslint-disable-next-line no-unused-vars
const theme = useTheme();
props = useThemeProps({ props, name: "PageFooter" });
let { ...restProps } = props;

return <MaybeFragment {...restProps} />;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export { default as Image } from "./Image.jsx";
export { default as PageBreadcrumbs } from "./PageBreadcrumbs.jsx";
export { default as PageContent } from "./PageContent.jsx";
export { default as PageFeaturedImage } from "./PageFeaturedImage.jsx";
export { default as PageFooter } from "./PageFooter.jsx";
export { default as PageHeading } from "./PageHeading.jsx";
export { default as PagePreamble } from "./PagePreamble.jsx";
export { default as Seo } from "./Seo.jsx";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
/** @jsx jsx */
import { css, jsx } from "@emotion/react";
import { Section, PageGrid, PageGridItem, useThemeProps } from "@wsui/base";
import {
Section,
PageGrid,
PageGridItem,
useThemeProps,
handleComponentsProp,
} from "@wsui/base";

import { usePageContext } from "../../hooks/page-context";
import {
Expand All @@ -10,14 +16,19 @@ import {
PageHeading,
PagePreamble,
// PageSiblingNavigation,
PageFooter as DefaultPageFooter,
Seo,
} from "../components";

export default function DefaultTemplate(props) {
// eslint-disable-next-line no-unused-vars
props = useThemeProps({ props, name: "DefaultTemplate" });
props = useThemeProps({ props, name: "Template" });
let { defaultColspan = 7 } = props;
let { defaultColspan = 7, components } = props;
components = handleComponentsProp(components, {
PageFooter: DefaultPageFooter,
});
let { PageFooter } = components;
const { title } = usePageContext();
return (
<article>
Expand All @@ -37,14 +48,7 @@ export default function DefaultTemplate(props) {
</PageGridItem>
</PageGrid>
<Section>
{/* <footer className={styles.footer}>
<PageMeta />
<PageGrid>
<PageGridItem>
<PageSiblingNavigation />
</PageGridItem>
</PageGrid>
</footer> */}
<PageFooter />
</Section>
</article>
);
Expand Down

0 comments on commit 8334c1f

Please sign in to comment.