-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #444 from NYPL/SFR-1721_remove_template_footer
SFR-1721: Remove TemplateFooter and upgrade DS
- Loading branch information
Showing
16 changed files
with
1,667 additions
and
1,111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
import { | ||
Breadcrumbs, | ||
Template, | ||
TemplateBreakout, | ||
TemplateContent, | ||
TemplateContentPrimary, | ||
TemplateContentSidebar, | ||
TemplateContentTop, | ||
TemplateHeader, | ||
} from "@nypl/design-system-react-components"; | ||
import { BreadcrumbsDataProps } from "@nypl/design-system-react-components/dist/src/components/Breadcrumbs/Breadcrumbs"; | ||
import React from "react"; | ||
import { defaultBreadcrumbs } from "~/src/constants/labels"; | ||
|
||
const DrbBreakout: React.FC<{ | ||
children?: React.ReactNode; | ||
breadcrumbsData?: BreadcrumbsDataProps[]; | ||
}> = ({ children, breadcrumbsData }) => { | ||
return ( | ||
<TemplateBreakout> | ||
<DrbBreadcrumbs breadcrumbsData={breadcrumbsData} /> | ||
{children} | ||
</TemplateBreakout> | ||
); | ||
}; | ||
|
||
const DrbBreadcrumbs: React.FC<{ breadcrumbsData: BreadcrumbsDataProps[] }> = ( | ||
props | ||
) => { | ||
const { breadcrumbsData } = props; | ||
|
||
const breadcrumbsDataAll = breadcrumbsData | ||
? [...defaultBreadcrumbs, ...breadcrumbsData] | ||
: defaultBreadcrumbs; | ||
|
||
return ( | ||
<Breadcrumbs | ||
breadcrumbsType="research" | ||
breadcrumbsData={breadcrumbsDataAll} | ||
/> | ||
); | ||
}; | ||
|
||
const DrbHeader: React.FC<{ children: React.ReactNode }> = ({ children }) => { | ||
return <TemplateHeader>{children}</TemplateHeader>; | ||
}; | ||
|
||
const DrbContent: React.FC<{ | ||
children: React.ReactNode; | ||
sidebar?: "left" | "right" | "none"; | ||
}> = ({ children, sidebar }) => { | ||
return <TemplateContent sidebar={sidebar}>{children}</TemplateContent>; | ||
}; | ||
|
||
const DrbContentTop: React.FC<{ children: React.ReactNode }> = ({ | ||
children, | ||
}) => { | ||
return <TemplateContentTop>{children}</TemplateContentTop>; | ||
}; | ||
|
||
const DrbContentSidebar: React.FC<{ children: React.ReactNode }> = ({ | ||
children, | ||
}) => { | ||
return <TemplateContentSidebar>{children}</TemplateContentSidebar>; | ||
}; | ||
|
||
const DrbContentPrimary: React.FC<{ children: React.ReactNode }> = ({ | ||
children, | ||
}) => { | ||
return <TemplateContentPrimary>{children}</TemplateContentPrimary>; | ||
}; | ||
|
||
export const DrbTemplate: React.FC<{ children: React.ReactNode }> = ({ | ||
children, | ||
}) => { | ||
return <Template>{children}</Template>; | ||
}; | ||
|
||
export { | ||
DrbBreakout, | ||
DrbHeader, | ||
DrbContent, | ||
DrbContentTop, | ||
DrbContentSidebar, | ||
DrbContentPrimary, | ||
}; | ||
|
||
export default DrbTemplate; |
Oops, something went wrong.
3060540
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
sfr-bookfinder-front-end – ./
sfr-bookfinder-front-end-nypl.vercel.app
sfr-bookfinder-front-end-git-development-nypl.vercel.app
sfr-bookfinder-front-end.vercel.app