diff --git a/apps/frontend/src/components/SkeletonBlock.tsx b/apps/frontend/src/components/SkeletonBlock.tsx index 0419c7f..c363547 100644 --- a/apps/frontend/src/components/SkeletonBlock.tsx +++ b/apps/frontend/src/components/SkeletonBlock.tsx @@ -1,20 +1 @@ -export function SkeletonBlock({ - width, - height, - borderRadius = 4, -}: { - width?: string | number; - height?: string | number; - borderRadius?: number; -}) { - return ( -
- ); -} +export { SkeletonBlock } from '../shared/ui/SkeletonBlock'; diff --git a/apps/frontend/src/components/TableSkeleton.tsx b/apps/frontend/src/components/TableSkeleton.tsx index 79748f7..ba8f8ef 100644 --- a/apps/frontend/src/components/TableSkeleton.tsx +++ b/apps/frontend/src/components/TableSkeleton.tsx @@ -1,25 +1 @@ -import { SkeletonBlock } from './SkeletonBlock'; - -const tdStyle = { - borderBottom: '1px solid #eeeeee', - padding: '10px 8px', - verticalAlign: 'top', -} satisfies React.CSSProperties; - -type Column = { width: string }; - -export function TableSkeleton({ rows = 5, columns }: { rows?: number; columns: Column[] }) { - return ( - - {Array.from({ length: rows }).map((_, i) => ( - - {columns.map((col, j) => ( - - - - ))} - - ))} - - ); -} +export { TableSkeleton } from '../shared/ui/TableSkeleton'; diff --git a/apps/frontend/src/shared/ui/SkeletonBlock.tsx b/apps/frontend/src/shared/ui/SkeletonBlock.tsx new file mode 100644 index 0000000..0419c7f --- /dev/null +++ b/apps/frontend/src/shared/ui/SkeletonBlock.tsx @@ -0,0 +1,20 @@ +export function SkeletonBlock({ + width, + height, + borderRadius = 4, +}: { + width?: string | number; + height?: string | number; + borderRadius?: number; +}) { + return ( +
+ ); +} diff --git a/apps/frontend/src/shared/ui/TableSkeleton.tsx b/apps/frontend/src/shared/ui/TableSkeleton.tsx new file mode 100644 index 0000000..5190a2e --- /dev/null +++ b/apps/frontend/src/shared/ui/TableSkeleton.tsx @@ -0,0 +1,25 @@ +import { SkeletonBlock } from '@/shared/ui/SkeletonBlock'; + +const tdStyle = { + borderBottom: '1px solid #eeeeee', + padding: '10px 8px', + verticalAlign: 'top', +} satisfies React.CSSProperties; + +type Column = { width: string }; + +export function TableSkeleton({ rows = 5, columns }: { rows?: number; columns: Column[] }) { + return ( + + {Array.from({ length: rows }).map((_, i) => ( + + {columns.map((col, j) => ( + + + + ))} + + ))} + + ); +} diff --git a/apps/frontend/src/shared/ui/index.ts b/apps/frontend/src/shared/ui/index.ts new file mode 100644 index 0000000..977fbbb --- /dev/null +++ b/apps/frontend/src/shared/ui/index.ts @@ -0,0 +1,2 @@ +export { SkeletonBlock } from './SkeletonBlock'; +export { TableSkeleton } from './TableSkeleton';