@hypothesis/frontend-shared
Version:
Shared components, styles and utilities for Hypothesis projects
32 lines • 914 B
JavaScript
var _jsxFileName = "/home/runner/work/frontend-shared/frontend-shared/src/components/layout/CardContent.tsx";
import classnames from 'classnames';
import { downcastRef } from '../../util/typing';
import { jsxDEV as _jsxDEV } from "preact/jsx-dev-runtime";
/**
* Apply consistent spacing and padding for actions content inside a Card
*/
export default function CardContent({
children,
classes,
elementRef,
size = 'md',
...htmlAttributes
}) {
return _jsxDEV("div", {
"data-component": "CardContent",
...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),
children: children
}, void 0, false, {
fileName: _jsxFileName,
lineNumber: 29,
columnNumber: 5
}, this);
}
//# sourceMappingURL=CardContent.js.map