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