refactor: Migrate component styles to page.module.css

This commit updates the components to use styles from page.module.css instead of separate module CSS files, simplifying the styling approach and reducing the number of CSS files in the project.

Key changes:
- Removed separate module CSS files for components
- Updated import statements to use page.module.css
- Adjusted class names to match existing styles in page.module.css
- Maintained component functionality and structure
This commit is contained in:
2025-02-23 00:46:09 -06:00
parent 2e6ab53d34
commit 969c4a916e
4 changed files with 81 additions and 71 deletions
+16 -10
View File
@@ -1,15 +1,21 @@
import styles from './Section.module.css';
'use client';
import { ReactNode } from 'react';
import styles from '../app/page.module.css';
type SectionProps = {
children: React.ReactNode;
background?: 'light' | 'dark';
className?: string;
};
children: ReactNode;
background?: 'light' | 'dark';
className?: string;
}
export function Section({ children, background = 'light', className = '' }: SectionProps) {
return (
<section className={`${styles.section} ${styles[background]} ${className}`}>
{children}
</section>
);
return (
<div className={[
className,
background === 'dark' ? styles.darkSection : ''
].filter(Boolean).join(' ')}>
{children}
</div>
);
}