diff --git a/src/components/Switch.tsx b/src/components/Switch.tsx index adf4edab..f8d1aed3 100644 --- a/src/components/Switch.tsx +++ b/src/components/Switch.tsx @@ -1,4 +1,4 @@ -import { useMemo, useRef } from 'react' +import { type ComponentProps, useMemo, useRef } from 'react' import { useToggleState } from 'react-stately' import { type AriaSwitchProps, @@ -26,7 +26,7 @@ type UseSwitchProps = Omit< } export type SwitchProps = UseSwitchProps & - Pick + Pick, 'as'> & { className?: string } const SwitchSC = styled.label( ({ $checked, $disabled, $readOnly, theme }) => ({ diff --git a/src/components/Table.tsx b/src/components/Table.tsx index f58dc4cf..8f3759d2 100644 --- a/src/components/Table.tsx +++ b/src/components/Table.tsx @@ -18,6 +18,7 @@ import type { FilterFn, Row, SortDirection, + TableOptions, } from '@tanstack/react-table' import { flexRender, @@ -64,7 +65,7 @@ export type TableProps = Omit< Parameters, 'parentRef' | 'size' > - reactTableOptions?: Omit, 'data' | 'columns'> + reactTableOptions?: Partial, 'data' | 'columns'>> onRowClick?: (e: MouseEvent, row: Row) => void } diff --git a/src/stories/Table.stories.tsx b/src/stories/Table.stories.tsx index ede46127..afcc7485 100644 --- a/src/stories/Table.stories.tsx +++ b/src/stories/Table.stories.tsx @@ -1,6 +1,6 @@ import { createColumnHelper } from '@tanstack/react-table' import { Div, Flex, Input, type InputProps, P } from 'honorable' -import React, { type ReactElement, useEffect } from 'react' +import React, { type ComponentProps, type ReactElement, useEffect } from 'react' import type { Row } from '@tanstack/react-table' import { @@ -235,7 +235,7 @@ function DebouncedInput({ ) } -function FilterableTemplate(args: any) { +function FilterableTemplate(args: ComponentProps) { const [globalFilter, setGlobalFilter] = React.useState('') return (