import React from 'react'; import { motion } from 'framer-motion'; interface BackgroundPatternProps { pattern?: string; accentColor?: string; isDark?: boolean; } export const BackgroundPattern: React.FC = ({ pattern = 'none', accentColor = '#3b82f6', isDark = true }) => { if (pattern === 'none') return null; const opacity = isDark ? 0.15 : 0.08; const getPattern = () => { switch (pattern) { case 'grid': return (
); case 'dots': return (
); case 'stripes': return (
); case 'radial': return (
); case 'mesh': return (
); case 'aurora': return (
); case 'waves': return (
); case 'topography': // Using a simplified SVG pattern for topography return (
); case 'particles': return (
{[...Array(20)].map((_, i) => ( ))}
); case 'circuit': case 'boxes': case 'honeycomb': // Using fallback CSS patterns for these specific complex geometric requests const size = pattern === 'honeycomb' ? '60px 104px' : '40px 40px'; const bgImage = pattern === 'honeycomb' ? `radial-gradient(circle at 50% 50%, transparent 50%, ${accentColor} 55%)` : `linear-gradient(45deg, ${accentColor} 25%, transparent 25%, transparent 75%, ${accentColor} 75%, ${accentColor}), linear-gradient(45deg, ${accentColor} 25%, transparent 25%, transparent 75%, ${accentColor} 75%, ${accentColor})`; return (
); default: return null; } }; return (
{getPattern()}
); };