import React from 'react' import type { FDFeatureAnnouncementBlock as FDFeatureAnnouncementBlockProps } from '@/payload-types' import { FDButton } from '@/components/FDButton' export const FDFeatureAnnouncementBlockComponent: React.FC = ({ heading, body, ctaText, ctaLink = '#', theme = 'gray', anchorId, }) => { const isDark = theme === 'dark' // Light themes pick up dark: variants from OS preference const bgClass = isDark ? 'bg-fd-navy' : theme === 'gray' ? 'bg-fd-gray-light dark:bg-fd-navy' : 'bg-white dark:bg-fd-navy' const headingColor = isDark ? 'text-fd-yellow' : 'text-fd-navy dark:text-fd-yellow' const bodyColor = isDark ? 'text-white' : 'text-fd-navy dark:text-white' // In dark mode the section is always navy, so onDark=true for the button const onDark = isDark || true // once dark: kicks in bg is navy anyway return (

{heading}

{body}

{ctaText && ( {ctaText} )}
) }