diff --git a/src/providers/themeProvider/ThemeProvider.tsx b/src/providers/themeProvider/ThemeProvider.tsx index 07747ee..4eeebcb 100644 --- a/src/providers/themeProvider/ThemeProvider.tsx +++ b/src/providers/themeProvider/ThemeProvider.tsx @@ -1,23 +1,19 @@ 'use client'; -import React, { createContext, useContext, useState } from 'react'; +import React, { createContext, useContext, ReactNode } from 'react'; -interface SocialLink { - platform: string; - url: string; - icon: string; -} - -interface TeamMember { - id: string; - name: string; - role: string; - image: string; - socialLinks: SocialLink[]; -} - -interface TeamCardProps { - member: TeamMember; +interface ThemeProviderProps { + children: ReactNode; + defaultButtonVariant?: string; + defaultTextAnimation?: string; + borderRadius?: 'soft' | 'medium' | 'sharp'; + contentWidth?: 'small' | 'medium' | 'large'; + sizing?: string; + background?: string; + cardStyle?: string; + primaryButtonStyle?: string; + secondaryButtonStyle?: string; + headingFontWeight?: string; } interface ThemeContextType { @@ -35,141 +31,19 @@ interface ThemeContextType { const ThemeContext = createContext(undefined); -export function useTheme(): ThemeContextType { - const context = useContext(ThemeContext); - if (context === undefined) { - return { - defaultButtonVariant: 'text-stagger', - defaultTextAnimation: 'entrance-slide', - borderRadius: 'rounded', - contentWidth: 'medium', - sizing: 'medium', - background: 'circleGradient', - cardStyle: 'glass-elevated', - primaryButtonStyle: 'gradient', - secondaryButtonStyle: 'glass', - headingFontWeight: 'normal' - }; - } - return context; -} - -function TeamCard({ member }: TeamCardProps) { - const [isFlipped, setIsFlipped] = useState(false); - - return ( -
setIsFlipped(true)} - onMouseLeave={() => setIsFlipped(false)} - > -
- {/* Front Side */} -
-
- {member.name} -
-

- {member.name} -

-

- {member.role} -

-
- - {/* Back Side */} -
-

- Connect -

-
- {member.socialLinks.map((link) => ( - - {link.icon} - - ))} -
-
-
-
- ); -} - -interface ThemeProviderProps { - children: React.ReactNode; - defaultButtonVariant?: string; - defaultTextAnimation?: string; - borderRadius?: string; - contentWidth?: string; - sizing?: string; - background?: string; - cardStyle?: string; - primaryButtonStyle?: string; - secondaryButtonStyle?: string; - headingFontWeight?: string; -} - export function ThemeProvider({ children, - defaultButtonVariant, - defaultTextAnimation, - borderRadius, - contentWidth, - sizing, - background, - cardStyle, - primaryButtonStyle, - secondaryButtonStyle, - headingFontWeight, + defaultButtonVariant = 'default', + defaultTextAnimation = 'none', + borderRadius = 'medium', + contentWidth = 'medium', + sizing = 'medium', + background = 'light', + cardStyle = 'solid', + primaryButtonStyle = 'solid', + secondaryButtonStyle = 'outline', + headingFontWeight = 'bold', }: ThemeProviderProps) { - const backgroundClasses = { - aurora: 'bg-gradient-to-br from-slate-950 via-purple-900 to-slate-950', - light: 'bg-white', - dark: 'bg-slate-900', - }; - - const borderRadiusClasses = { - soft: 'rounded-lg', - sharp: 'rounded-none', - smooth: 'rounded-2xl', - }; - - const contentWidthClasses = { - small: 'max-w-2xl', - medium: 'max-w-6xl', - large: 'max-w-7xl', - }; - - const bgClass = backgroundClasses[background as keyof typeof backgroundClasses] || backgroundClasses.aurora; - const radiusClass = borderRadiusClasses[borderRadius as keyof typeof borderRadiusClasses] || borderRadiusClasses.soft; - const widthClass = contentWidthClasses[contentWidth as keyof typeof contentWidthClasses] || contentWidthClasses.medium; - const themeValue: ThemeContextType = { defaultButtonVariant, defaultTextAnimation, @@ -183,20 +57,30 @@ export function ThemeProvider({ headingFontWeight, }; + const borderRadiusClass = { + soft: 'rounded-2xl', + medium: 'rounded-lg', + sharp: 'rounded-none', + }[borderRadius] || 'rounded-lg'; + + const contentWidthClass = { + small: 'max-w-2xl', + medium: 'max-w-4xl', + large: 'max-w-6xl', + }[contentWidth] || 'max-w-4xl'; + + const backgroundClass = { + aurora: 'bg-gradient-to-br from-purple-900 via-blue-900 to-indigo-900', + light: 'bg-white', + dark: 'bg-gray-900', + }[background] || 'bg-white'; + return (
-
+
{children}
@@ -204,12 +88,10 @@ export function ThemeProvider({ ); } -export function TeamCardGrid({ members }: { members: TeamMember[] }) { - return ( -
- {members.map((member) => ( - - ))} -
- ); +export function useTheme(): ThemeContextType { + const context = useContext(ThemeContext); + if (context === undefined) { + throw new Error('useTheme must be used within a ThemeProvider'); + } + return context; } \ No newline at end of file