/******************************************************************************** * Copyright (c) 2026 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at * https://www.eclipse.org/legal/epl-2.0 * * SPDX-License-Identifier: EPL-2.0 ********************************************************************************/ import { FunctionComponent, ReactNode } from 'react'; import { Box, Container, Typography } from '@mui/material'; import { styled } from '@mui/material/styles'; import type { Theme } from '@mui/material/styles'; import { Link as RouteLink } from 'react-router'; import { HomeInvolvementCard } from '../../page-settings'; import { Eyebrow, focusOutline } from '../../components/page-primitives'; const GetInvolvedCard = styled(Box)(({ theme }) => ({ backgroundColor: theme.palette.background.paper, border: `1px solid ${theme.palette.divider}`, borderRadius: theme.shape.borderRadiusCard, padding: '1.25rem', display: 'flex', flexDirection: 'column' })); const getInvolvedLinkStyles = ({ theme }: { theme: Theme }) => ({ fontSize: '0.8125rem', fontWeight: 600, color: theme.palette.secondary.light, textDecoration: 'none', '&:hover': { textDecoration: 'underline' }, ...focusOutline(theme) }); const GetInvolvedAnchorLink = styled('a')(getInvolvedLinkStyles); const GetInvolvedRouteLink = styled(RouteLink)(getInvolvedLinkStyles); interface GetInvolvedLinkProps { href: string; children: ReactNode; } const GetInvolvedLink: FunctionComponent = ({ href, children }) => { const external = /^https?:\/\//.test(href); const internalRoute = href.startsWith('/') && !href.startsWith('//'); if (internalRoute) { return {children}; } return ( {children} ); }; export interface GetInvolvedProps { heading?: string; cards?: HomeInvolvementCard[]; } /** Consumer-configured "Get Involved" cards (contribute, sponsor, etc.). */ export const GetInvolved: FunctionComponent = ({ heading, cards }) => { if (!cards || cards.length === 0) { return null; } return ( {heading ?? 'Get Involved'} {cards.map(card => { return ( svg': { fontSize: '1.125rem' } }}> {card.icon} {card.title} {card.description} {card.label} ); })} ); };