From 3b2888e1a0788b68e16073e026921f08d1e70c6d Mon Sep 17 00:00:00 2001 From: Marcin Maciaszczyk Date: Fri, 18 Oct 2024 13:47:36 +0200 Subject: [PATCH] fix the type of table empty state props --- src/components/EmptyState.tsx | 2 +- src/components/Table.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/EmptyState.tsx b/src/components/EmptyState.tsx index f640cb6e..42f0b83d 100644 --- a/src/components/EmptyState.tsx +++ b/src/components/EmptyState.tsx @@ -6,7 +6,7 @@ import { } from 'react' import styled from 'styled-components' -type EmptyStateProps = ComponentProps & { +export type EmptyStateProps = ComponentProps & { message: string description?: string icon?: ReactElement diff --git a/src/components/Table.tsx b/src/components/Table.tsx index 94ae8c48..ff4dcffa 100644 --- a/src/components/Table.tsx +++ b/src/components/Table.tsx @@ -41,7 +41,7 @@ import Button from './Button' import CaretUpIcon from './icons/CaretUpIcon' import ArrowRightIcon from './icons/ArrowRightIcon' import { FillLevelProvider } from './contexts/FillLevelContext' -import EmptyState from './EmptyState' +import EmptyState, { type EmptyStateProps } from './EmptyState' import { Spinner } from './Spinner' export type TableProps = DivProps & { @@ -64,7 +64,7 @@ export type TableProps = DivProps & { > reactTableOptions?: Partial, 'data' | 'columns'>> onRowClick?: (e: MouseEvent, row: Row) => void - emptyStateProps?: ComponentProps + emptyStateProps?: EmptyStateProps hasNextPage?: boolean fetchNextPage?: () => void isFetchingNextPage?: boolean