mirror of
https://github.com/jaronpate/unicord.git
synced 2026-10-18 21:47:40 +00:00
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:
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user