pagamio-frontend-commons-lib
Version:
Pagamio library for Frontend reusable components like the form engine and table container
14 lines (13 loc) • 987 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { ExternalLinkIcon } from '@radix-ui/react-icons';
import { Card as FlowbiteCard } from 'flowbite-react';
const Card = ({ title, children, onOpenDetails, className, showDetailsModal = true }) => {
return (_jsxs(FlowbiteCard, { className: `relative w-full sm:w-auto ${className} border-b-4 border-b-primary-500`, style: {
height: '100%',
}, theme: {
root: {
children: 'p-3 gap-1',
},
}, children: [title && (_jsxs("div", { className: "mb-1 flex justify-between", children: [_jsx("h3", { className: "text-[15px] text-bold font-medium", children: title }), onOpenDetails && showDetailsModal && (_jsx("button", { onClick: onOpenDetails, className: "text-gray-500 hover:text-gray-700 focus:outline-none", "aria-label": "Open in new window", children: _jsx(ExternalLinkIcon, { className: "h-5 w-5" }) }))] })), children] }));
};
export default Card;