From 0a3108611e82da9ed176a4478abc469c2ff09a83 Mon Sep 17 00:00:00 2001 From: jay-hodgson Date: Thu, 12 Sep 2024 20:37:52 -0700 Subject: [PATCH] PORTALS-3241 integration test --- apps/portals/nf/src/config/routesConfig.ts | 16 ++++++++++++++++ .../src/style/components/_DetailsPage.scss | 1 - .../src/types/portal-config.ts | 6 ++++++ .../synapse-react-client/src/components/index.ts | 1 + 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/apps/portals/nf/src/config/routesConfig.ts b/apps/portals/nf/src/config/routesConfig.ts index d0318c6b45..cbfa48a57d 100644 --- a/apps/portals/nf/src/config/routesConfig.ts +++ b/apps/portals/nf/src/config/routesConfig.ts @@ -259,6 +259,22 @@ const routes: GenericRoute[] = [ { path: '', synapseConfigArray: [ + { + name: 'SharePageLinkButton', + props: { + buttonProps: { + color: 'white', + variant: 'text', + sx: { + position: 'absolute', + top: '50px', + right: '20px', + zIndex: 100, + }, + }, + }, + containerClassName: 'container-full-width', + }, { name: 'CardContainerLogic', isOutsideContainer: true, diff --git a/apps/synapse-portal-framework/src/style/components/_DetailsPage.scss b/apps/synapse-portal-framework/src/style/components/_DetailsPage.scss index 4f8ca0f551..7e1386223b 100644 --- a/apps/synapse-portal-framework/src/style/components/_DetailsPage.scss +++ b/apps/synapse-portal-framework/src/style/components/_DetailsPage.scss @@ -29,7 +29,6 @@ $svg-icon-height: 30px; .DetailsPage { display: flex; - // keeps h2 in markdown and in this component the same .h2, h2 { diff --git a/apps/synapse-portal-framework/src/types/portal-config.ts b/apps/synapse-portal-framework/src/types/portal-config.ts index 8d09db8af5..b9f1923c4f 100644 --- a/apps/synapse-portal-framework/src/types/portal-config.ts +++ b/apps/synapse-portal-framework/src/types/portal-config.ts @@ -27,6 +27,7 @@ import { UserCardListRotateProps, UserCardProps, DynamicFormProps, + SharePageLinkButtonProps, } from 'synapse-react-client' import { RouteControlWrapperProps } from '../components/RouteControlWrapper' import { HomePageCardContainerProps } from '../components/csbc-home-page/HomePageCardContainer' @@ -177,6 +178,10 @@ type GenieHomePageHeader = { name: 'GenieHomePageHeader' props: undefined } +type SharePageLinkButton = { + name: 'SharePageLinkButton' + props: SharePageLinkButtonProps +} type SynapseComponentCollapse = { name: 'SynapseComponentCollapse' props: SynapseComponentCollapseProps @@ -388,6 +393,7 @@ export type SynapseConfig = ( | TimelinePlot | DatasetJsonLdScript | DynamicForm + | SharePageLinkButton ) & Metadata diff --git a/packages/synapse-react-client/src/components/index.ts b/packages/synapse-react-client/src/components/index.ts index fec0116d60..1785d5fa9a 100644 --- a/packages/synapse-react-client/src/components/index.ts +++ b/packages/synapse-react-client/src/components/index.ts @@ -75,6 +75,7 @@ export * from './AccessRequirementRelatedProjectsList' export * from './HelpPopover' export * from './MuiContainer' export * from './DatasetJsonLdScript' +export * from './SharePageLinkButton' // TODO: Find a better way to expose Icon components export { Project as ProjectIcon } from '../assets/themed_icons/Project'