-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0c38e95
commit d55fb11
Showing
7 changed files
with
84 additions
and
13 deletions.
There are no files selected for viewing
8 changes: 2 additions & 6 deletions
8
frontend/packages/data-portal/app/components/BrowseData/BrowseDataHeader.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 |
---|---|---|
@@ -1,13 +1,9 @@ | ||
import { BrowseDataSearch } from './BrowseDataSearch' | ||
import { BrowseDataTabs } from './BrowseDataTabs' | ||
|
||
export function BrowseDataHeader() { | ||
return ( | ||
<div className="px-sds-xl py-sds-l flex justify-center"> | ||
<div className="flex gap-sds-xl w-full max-w-content"> | ||
<BrowseDataSearch /> | ||
<BrowseDataTabs /> | ||
</div> | ||
<div className="px-sds-xl py-[18px] flex w-full max-w-content"> | ||
<BrowseDataTabs /> | ||
</div> | ||
) | ||
} |
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
55 changes: 55 additions & 0 deletions
55
frontend/packages/data-portal/app/components/TablePageLayout/TableHeaderDefinition.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,55 @@ | ||
import { ReactNode } from 'react' | ||
|
||
import { Link } from 'app/components/Link' | ||
import { useI18n } from 'app/hooks/useI18n' | ||
|
||
import { TableCount } from './TableCount' | ||
import { TableHeaderProps } from './TableHeader' | ||
|
||
export function TableHeaderDefinition({ | ||
countLabel, | ||
filteredCount, | ||
totalCount, | ||
title, | ||
description, | ||
learnMoreLink, | ||
search, | ||
}: TableHeaderProps & { | ||
search?: ReactNode | ||
}) { | ||
const { t } = useI18n() | ||
|
||
return ( | ||
<div className="pt-sds-l px-sds-xxl"> | ||
<h1 className="text-sds-header-xxl leading-sds-header-xxl tracking-sds-header-xxl font-semibold"> | ||
{title} | ||
</h1> | ||
|
||
<p className="text-sds-body-s leading-sds-body-s tracking-sds-body-s max-w-[600px] mt-sds-s"> | ||
<span className="text-sds-color-semantic-text-base-secondary"> | ||
{description} | ||
</span> | ||
|
||
{learnMoreLink && ( | ||
<Link | ||
className="text-sds-color-semantic-text-action-default hover:text-sds-color-semantic-text-action-hover" | ||
to={learnMoreLink} | ||
> | ||
{' '} | ||
{t('learnMore')} | ||
</Link> | ||
)} | ||
</p> | ||
|
||
<div className="flex justify-between items-center mt-sds-xl"> | ||
<TableCount | ||
filteredCount={filteredCount} | ||
totalCount={totalCount} | ||
type={countLabel} | ||
/> | ||
|
||
{search} | ||
</div> | ||
</div> | ||
) | ||
} |
2 changes: 2 additions & 0 deletions
2
frontend/packages/data-portal/app/components/TablePageLayout/index.ts
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 |
---|---|---|
@@ -1 +1,3 @@ | ||
export * from './TableHeader' | ||
export * from './TableHeaderDefinition' | ||
export * from './TablePageLayout' |
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