-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: info panel deposition metadata (#1092)
#918 Implements deposition metadata frontend in the info panel. This only implements the frontend, so it will need to be integrated with the backend as part of #920 ## Demos <img width="497" alt="image" src="https://github.com/user-attachments/assets/89ca0bfe-f354-472c-a644-b25aea4b4fe1"> <img width="476" alt="image" src="https://github.com/user-attachments/assets/ff64d737-4b0b-41ac-89b3-0b1d5d87ee3e">
- Loading branch information
1 parent
54b4fe5
commit 01a8b67
Showing
6 changed files
with
146 additions
and
36 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
frontend/packages/data-portal/app/components/Deposition/MethodLinks/MethodLink.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,31 @@ | ||
import { Link } from 'app/components/Link' | ||
import { useI18n } from 'app/hooks/useI18n' | ||
import { cns } from 'app/utils/cns' | ||
|
||
import { MethodLinkProps } from './common' | ||
|
||
export function MethodLink({ | ||
icon, | ||
i18nLabel, | ||
url, | ||
title, | ||
className, | ||
linkProps, | ||
}: MethodLinkProps) { | ||
const { t } = useI18n() | ||
|
||
return ( | ||
<span className={cns('flex flex-row', className)}> | ||
<span className="text-sds-gray-black items-center flex flex-row"> | ||
{icon} | ||
<span className="font-semibold ml-sds-xxs mr-sds-xs"> | ||
{t(i18nLabel)}: | ||
</span> | ||
</span> | ||
|
||
<Link to={url} {...linkProps}> | ||
{title ?? url} | ||
</Link> | ||
</span> | ||
) | ||
} |
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
1 change: 1 addition & 0 deletions
1
frontend/packages/data-portal/app/components/Deposition/MethodLinks/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,2 +1,3 @@ | ||
export * from './MethodLink' | ||
export * from './MethodLinksMetadataTable' | ||
export * from './MethodLinksOverview' |
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