Skip to content

Commit

Permalink
Merge pull request #557 from thepolicylab-projectportals/docs/fix-pag…
Browse files Browse the repository at this point in the history
…e-layout-storybook

docs: fix Layout in storybook
  • Loading branch information
hollandjg authored Aug 15, 2023
2 parents 3b4af90 + 7401536 commit ab52595
Showing 1 changed file with 22 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import React from "react"
import type { Meta, StoryObj } from "@storybook/react"
import { Layout } from "./Layout"
import * as BottomBannerStories from "../components/BottomBanner.stories"
import * as FooterStories from "../components/Footer.stories"
import * as NavbarStories from "../components/Navbar.stories"

import { bottomBannerLogo } from "../components/BottomBanner.stories"
import { footerLogo } from "../components/Footer.stories"
import { siteTitleLogo } from "../components/SiteTitle.stories"

const meta: Meta<typeof Layout> = {
component: Layout,
Expand All @@ -11,13 +18,23 @@ export default meta

type Story = StoryObj<typeof Layout>

// TODO: Fix this – relies on SiteMetadata, which uses a static query.
export const Primary: Story = {
args: {
activePage: "open",
title: "Page Title",
description: "The page description (metadata)",
data: {
projectPortalConfig: {
showDevBanner: true,
pages: NavbarStories.Primary.args.pages,
staticText: {
bottomBanner: BottomBannerStories.Primary.args,
footer: FooterStories.Primary.args,
},
},
site: { siteMetadata: { title: "The Site Title" } },
navbarLogo: siteTitleLogo,
bottomBannerLogo: bottomBannerLogo,
footerLogo: footerLogo,
},
path: "/open/",
children: <></>,
showDevBanner: false,
},
}

0 comments on commit ab52595

Please sign in to comment.