-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose As Is - PageHeader, LinkElement Prop & Logo (#1184)
**Related Ticket:** #1136 ### Description of Changes * Exposes the Page Header, LinkElement as prop, & LOGO without any additional styling ### Notes & Questions About Changes * **Related PR:** developmentseed/next-veda-ui#6 * Next Preview here (version published as `5.8.0-alpha.0`) => https://deploy-preview-6--veda-ui-next-test.netlify.app/ ### Validation / Testing * This should NOT break any current behavior with the page header and navigation
- Loading branch information
Showing
7 changed files
with
84 additions
and
33 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
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
30 changes: 30 additions & 0 deletions
30
app/scripts/components/common/page-header/logo-container.tsx
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,30 @@ | ||
import React, { ComponentType } from 'react'; | ||
import { Tip } from '../tip'; | ||
import { LinkProperties } from '../card'; | ||
import { Brand, PageTitleSecLink } from './logo'; | ||
/** | ||
* LogoContainer that is meant to integrate in the default page header without the dependencies of the veda virtual modules | ||
* and expects the Logo SVG to be passed in as a prop - this will support the instance for refactor | ||
*/ | ||
|
||
export default function LogoContainer ({ linkProperties, Logo, title, subTitle, version }: { | ||
linkProperties: LinkProperties, | ||
Logo: JSX.Element, | ||
title: string, | ||
subTitle: string, | ||
version: string | ||
}) { | ||
const LinkElement: ComponentType<any> = linkProperties.LinkElement as ComponentType<any>; | ||
|
||
return ( | ||
<Brand> | ||
<LinkElement {...{[linkProperties.pathAttributeKeyName]: '/'}}> | ||
{Logo} | ||
<span>{title}</span> <span>{subTitle}</span> | ||
</LinkElement> | ||
<Tip content={`v${version}`}> | ||
<PageTitleSecLink {...{as: linkProperties.LinkElement as ComponentType<any>, [linkProperties.pathAttributeKeyName]: '/development'}}>Beta</PageTitleSecLink> | ||
</Tip> | ||
</Brand> | ||
); | ||
} |
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