UNPKG

@baseplate-dev/ui-components

Version:

Shared UI component library

14 lines 1.02 kB
'use client'; import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { MdFormatListBulleted } from 'react-icons/md'; import { useComponentStrings } from '#src/contexts/component-strings.js'; import { cn } from '#src/utils/cn.js'; /** * Displays a generic empty state with a header and subtitle. */ function EmptyDisplay({ className, icon: Icon = MdFormatListBulleted, header, subtitle, actions, }) { const strings = useComponentStrings(); return (_jsx("div", { className: cn('flex h-full items-center justify-center', className), children: _jsxs("div", { className: "flex max-w-xl flex-col items-center space-y-4 text-center", children: [_jsx("div", { children: _jsx(Icon, { className: "size-20 text-muted-foreground" }) }), _jsx("h1", { children: header ?? strings.emptyDisplayDefaultHeader }), _jsx("p", { className: "text-muted-foreground", children: subtitle ?? strings.emptyDisplayDefaultContent }), actions] }) })); } export { EmptyDisplay }; //# sourceMappingURL=empty-display.js.map