-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* feat: "Need Help?" link near request access (#4173) * chore: updated findable (#4173) --------- Co-authored-by: Fran McDade <[email protected]>
- Loading branch information
Showing
6 changed files
with
1,366 additions
and
1,285 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
...Page/components/BackPageHero/components/BackPageHeroActions/backPageHeroActions.styles.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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { BackPageHeroActions } from "@databiosphere/findable-ui/lib/components/Layout/components/BackPage/components/BackPageHero/components/Actions/actions.styles"; | ||
import { mediaTabletUp } from "@databiosphere/findable-ui/lib/styles/common/mixins/breakpoints"; | ||
import styled from "@emotion/styled"; | ||
|
||
export const StyledBackPageHeroActions = styled(BackPageHeroActions)` | ||
display: contents; | ||
.MuiButton-root, | ||
.MuiLink-root { | ||
grid-column: 1 / -1; | ||
} | ||
.MuiButton-root { | ||
padding-bottom: 8px; | ||
padding-top: 8px; | ||
width: fit-content; | ||
} | ||
${mediaTabletUp} { | ||
display: flex; | ||
.MuiLink-root { | ||
margin: auto 0; | ||
} | ||
} | ||
`; |
39 changes: 39 additions & 0 deletions
39
...s/BackPage/components/BackPageHero/components/BackPageHeroActions/backPageHeroActions.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,39 @@ | ||
import { | ||
CallToActionButton, | ||
CallToActionButtonProps, | ||
} from "@databiosphere/findable-ui/lib/components/common/Button/components/CallToActionButton/callToActionButton"; | ||
import { | ||
Link, | ||
LinkProps, | ||
} from "@databiosphere/findable-ui/lib/components/Links/components/Link/link"; | ||
import { useConfig } from "@databiosphere/findable-ui/lib/hooks/useConfig"; | ||
import { TEXT_BODY_500 } from "@databiosphere/findable-ui/lib/theme/common/typography"; | ||
import { SiteConfig } from "../../../../../../../../../site-config/common/entities"; | ||
import { StyledBackPageHeroActions } from "./backPageHeroActions.styles"; | ||
|
||
export interface BackPageHeroActionsProps { | ||
callToActionProps: CallToActionButtonProps; | ||
linkProps?: Omit<LinkProps, "url"> & { getURL: (origin?: string) => string }; | ||
} | ||
|
||
export const BackPageHeroActions = ({ | ||
callToActionProps, | ||
linkProps, | ||
}: BackPageHeroActionsProps): JSX.Element => { | ||
const { config } = useConfig() as { config: SiteConfig }; | ||
const { getURL, label, ...otherProps } = linkProps || {}; | ||
const linkUrl = getURL?.(config.portalURL); | ||
return ( | ||
<StyledBackPageHeroActions> | ||
{linkUrl && ( | ||
<Link | ||
TypographyProps={{ variant: TEXT_BODY_500 }} | ||
{...otherProps} | ||
label={label} | ||
url={linkUrl} | ||
/> | ||
)} | ||
<CallToActionButton {...callToActionProps} /> | ||
</StyledBackPageHeroActions> | ||
); | ||
}; |
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
Oops, something went wrong.