All files / src/components/ui CardContent.jsx

100% Statements 1/1
100% Branches 1/1
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 27 28 29 30                              50x                            
import React from "react";
 
/**
 * CardContent component for content section inside a card with padding and text styling.
 *
 * @component
 * @module components/ui/CardContent
 *
 * @param {object} props - Component properties.
 * @param {React.ReactNode} props.children - Inner content of the CardContent.
 * @param {string} [props.className] - Additional CSS classes to add to the content div.
 * @param {object} [props.rest] - Other props to spread on the container div (e.g., event handlers, data attributes).
 * @returns {JSX.Element} Content container with padding and text styles.
 */
export function CardContent({children, className = "", ...rest}) {
    return (
        <div
            {...rest}
            className={`
                p-4 sm:p-6 md:p-8
                text-sm sm:text-base
                text-gray-900 dark:text-gray-300
                ${className}
            `}
        >
            {children}
        </div>
    );
}