UNPKG

@hypothesis/frontend-shared

Version:

Shared components, styles and utilities for Hypothesis projects

42 lines (40 loc) 1.24 kB
var _jsxFileName = "/home/runner/work/frontend-shared/frontend-shared/src/components/layout/CardContent.js"; import classnames from 'classnames'; import { downcastRef } from '../../util/typing'; /** * @typedef {import('../../types').PresentationalProps} CommonProps * @typedef {import('preact').JSX.HTMLAttributes<HTMLElement>} HTMLAttributes * * @typedef CardContentProps * @prop {'sm'|'md'|'lg'} [size='md'] - Relative spacing sizing */ /** * Apply consistent spacing and padding for content inside a Card * * @param {CommonProps & CardContentProps & Omit<HTMLAttributes, 'size'>} props */ import { jsxDEV as _jsxDEV } from "preact/jsx-dev-runtime"; export default function CardContent({ children, classes, elementRef, size = 'md', ...htmlAttributes }) { return _jsxDEV("div", { ...htmlAttributes, ref: downcastRef(elementRef), className: classnames({ 'p-3 space-y-4': size === 'md', // Default 'p-2 space-y-3': size === 'sm', 'p-4 space-y-6': size === 'lg' }, classes), "data-component": "CardContent", children: children }, void 0, false, { fileName: _jsxFileName, lineNumber: 28, columnNumber: 5 }, this); } //# sourceMappingURL=CardContent.js.map