From 1508a1c494c36d42715768d9d44543815d7d92c3 Mon Sep 17 00:00:00 2001 From: atanasster Date: Sat, 6 Jun 2020 11:08:22 -0400 Subject: [PATCH] feat: skip links and app layout --- .../stories/src/stories/home-page.stories.mdx | 3 +- .../src/components/GatsbyLink.tsx | 18 +---- .../src/components/Layout.tsx | 25 ++----- .../src/components/Sidebar.tsx | 12 --- ui/app-components/src/Sidebar/Sidebar.tsx | 20 ++++- ui/app-components/src/SkipLinks/SkipLinks.tsx | 73 +++++++++++++++++++ ui/app-components/src/SkipLinks/index.ts | 1 + ui/app-components/src/index.ts | 1 + ui/app/src/App/App.tsx | 53 ++++++++++++++ ui/app/src/App/index.ts | 1 + .../app/src/Footer}/Footer.tsx | 15 ++-- ui/app/src/Footer/index.ts | 1 + ui/app/src/Page/Page.tsx | 15 ++-- ui/app/src/SideContext/SideContext.tsx | 5 +- ui/app/src/Sidebar/Sidebar.tsx | 12 +-- ui/app/src/index.ts | 2 + ui/blocks/src/PageContainer/PageContainer.tsx | 7 +- .../src/BlockContainer/BlockContainer.tsx | 8 +- ui/components/src/BlockContainer/index.ts | 1 + ui/components/src/BlockContainer/pageLink.ts | 7 ++ 20 files changed, 198 insertions(+), 82 deletions(-) delete mode 100644 integrations/gatsby-theme-stories/src/components/Sidebar.tsx create mode 100644 ui/app-components/src/SkipLinks/SkipLinks.tsx create mode 100644 ui/app-components/src/SkipLinks/index.ts create mode 100644 ui/app/src/App/App.tsx create mode 100644 ui/app/src/App/index.ts rename {integrations/gatsby-theme-stories/src/components => ui/app/src/Footer}/Footer.tsx (58%) create mode 100644 ui/app/src/Footer/index.ts create mode 100644 ui/components/src/BlockContainer/pageLink.ts diff --git a/examples/stories/src/stories/home-page.stories.mdx b/examples/stories/src/stories/home-page.stories.mdx index 849279165..9150cb938 100644 --- a/examples/stories/src/stories/home-page.stories.mdx +++ b/examples/stories/src/stories/home-page.stories.mdx @@ -5,7 +5,7 @@ fullPage: true menu: false --- -import { jsx, Flex, Heading, Text } from 'theme-ui'; +import { jsx, Flex, Heading, Text, Button } from 'theme-ui'; @@ -13,6 +13,7 @@ import { jsx, Flex, Heading, Text } from 'theme-ui'; design -> develop -> test + diff --git a/integrations/gatsby-theme-stories/src/components/GatsbyLink.tsx b/integrations/gatsby-theme-stories/src/components/GatsbyLink.tsx index 38e824fe8..d1b4d4448 100644 --- a/integrations/gatsby-theme-stories/src/components/GatsbyLink.tsx +++ b/integrations/gatsby-theme-stories/src/components/GatsbyLink.tsx @@ -1,6 +1,6 @@ /** @jsx jsx */ import { FC } from 'react'; -import { jsx, LinkProps, Theme } from 'theme-ui'; +import { jsx, LinkProps } from 'theme-ui'; import { Link } from 'gatsby'; export const GatsbyLink: FC = ({ @@ -9,19 +9,5 @@ export const GatsbyLink: FC = ({ ...props }) => ( //@ts-ignore - `4px solid ${t?.colors?.accent}`, - color: 'white', - }, - ':hover': { - backgroundColor: 'shadow', - }, - }} - /> + ); diff --git a/integrations/gatsby-theme-stories/src/components/Layout.tsx b/integrations/gatsby-theme-stories/src/components/Layout.tsx index 146a8ddf7..eed234ebf 100644 --- a/integrations/gatsby-theme-stories/src/components/Layout.tsx +++ b/integrations/gatsby-theme-stories/src/components/Layout.tsx @@ -1,19 +1,17 @@ /** @jsx jsx */ import { FC } from 'react'; -import { jsx, Flex } from 'theme-ui'; +import { jsx } from 'theme-ui'; import { Global } from '@emotion/core'; import { ThemeProvider } from '@component-controls/components'; -import { Page, SEO, Header } from '@component-controls/app'; +import { App } from '@component-controls/app'; import { SidebarContextProvider, LinkContextProvider, } from '@component-controls/app-components'; import { BlockContextProvider } from '@component-controls/blocks'; import { Store } from '@component-controls/store'; -import { Sidebar } from './Sidebar'; import { GatsbyLink } from './GatsbyLink'; import { PagesConfig } from './types'; -import { Footer } from './Footer'; interface LayoutProps { title?: string; @@ -41,23 +39,10 @@ export const Layout: FC = ({ })} /> - - - -
- - - - -