refactor: Update Section and PackageManager components for improved type safety and consistency

This commit includes the following changes:
- Refactored PackageManager to use a more type-safe approach
- Updated Section component to use semantic `<section>` tag
- Adjusted background prop types and default values
- Simplified type definitions
- Improved code readability and maintainability
This commit is contained in:
2025-02-23 00:42:07 -06:00
parent c200bff8d0
commit 6eefe763e3
3 changed files with 50 additions and 40 deletions
+4 -4
View File
@@ -2,14 +2,14 @@ import styles from './Section.module.css';
type SectionProps = {
children: React.ReactNode;
background?: 'default' | 'dark';
background?: 'light' | 'dark';
className?: string;
};
export function Section({ children, background = 'default', className = '' }: SectionProps) {
export function Section({ children, background = 'light', className = '' }: SectionProps) {
return (
<div className={`${styles.section} ${styles[background]} ${className}`}>
<section className={`${styles.section} ${styles[background]} ${className}`}>
{children}
</div>
</section>
);
}