mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-08-07 11:54:19 -07:00
Typed Sass Styling (#69)
* Addresses issue #16 - Add styles via sass and module imports Adds typed scss imports via gatsby-plugin-sass. Makes use of .d.scss file generated by gatsby-plugin-scss-typescript, but avoids importing that directly while they work out issue in gatsby v3. * adding vscode config for easier local debugging
This commit is contained in:
parent
13a4e5f47a
commit
a587482967
11 changed files with 1334 additions and 1788 deletions
32
client/src/components/J40header.tsx
Normal file
32
client/src/components/J40header.tsx
Normal file
|
@ -0,0 +1,32 @@
|
|||
import React from 'react';
|
||||
import { GovBanner, Header, Title, PrimaryNav } from '@trussworks/react-uswds';
|
||||
import { useStaticQuery, graphql, Link } from "gatsby";
|
||||
|
||||
const headerLinks = [
|
||||
<Link to="/">Home</Link>
|
||||
];
|
||||
|
||||
const J40Header = () => {
|
||||
const data: any = useStaticQuery(graphql`
|
||||
query MyQuery {
|
||||
site {
|
||||
siteMetadata {
|
||||
title
|
||||
}
|
||||
}
|
||||
}
|
||||
`)
|
||||
|
||||
const siteTitle: string = data.site.siteMetadata?.title || `Title`
|
||||
return (
|
||||
<>
|
||||
<GovBanner />
|
||||
<Header>
|
||||
<Title>{siteTitle}</Title>
|
||||
<PrimaryNav items={headerLinks}/>
|
||||
</Header>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default J40Header;
|
Loading…
Add table
Add a link
Reference in a new issue