UNPKG

pagamio-frontend-commons-lib

Version:

Pagamio library for Frontend reusable components like the form engine and table container

12 lines (11 loc) 743 B
import { jsx as _jsx } from "react/jsx-runtime"; import { Card } from 'flowbite-react'; import React from 'react'; const SkeletonItem = () => _jsx("div", { className: "h-6 bg-gray-200 rounded-full w-[16%]" }); const FilterComponentSkeleton = () => { // eslint-disable-next-line @typescript-eslint/naming-convention const skeletonItems = Array.from({ length: 4 }, (_, index) => _jsx(SkeletonItem, {}, index)); return (_jsx(Card, { className: "mb-5", children: _jsx("div", { className: "animate-pulse", children: _jsx("div", { className: "flex space-x-3", children: skeletonItems }) }) })); }; // Wrapping the component with React.memo since it will always render the same output. export default React.memo(FilterComponentSkeleton);