All files / src/components/ui PageSection.jsx

100% Statements 1/1
100% Branches 0/0
100% Functions 1/1
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26                                29x                  
import React from "react";
 
/**
 * PageSection component renders a section element with a title and children content.
 *
 * It applies consistent padding and max-width styles and displays the title prominently.
 *
 * @component
 * @module components/ui/PageSection
 *
 * @param {Object} props
 * @param {string} props.title - The title text displayed as a section heading.
 * @param {React.ReactNode} props.children - The content inside the section.
 * @returns {JSX.Element} The rendered section element.
 */
export default function PageSection({title, children}) {
    return (
        <section className="px-4 py-6 sm:px-6 md:px-8 max-w-7xl mx-auto">
            <h2 className="text-2xl sm:text-3xl font-bold mb-4 sm:mb-6 text-gray-900 dark:text-white">
                {title}
            </h2>
            {children}
        </section>
    );
}