Skip to content

Commit

Permalink
fix: include node types for GridItemPops (#1054)
Browse files Browse the repository at this point in the history
* fix: include node types for GridItemPops

* chore: prettier

---------

Co-authored-by: Petyo Ivanov <[email protected]>
  • Loading branch information
flbn and petyosi authored Mar 28, 2024
1 parent 61b18d2 commit 9372b9a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ export type GridListProps = Pick<React.ComponentProps<'div'>, 'style' | 'childre
'data-test-id': string
} & React.RefAttributes<HTMLDivElement>

/**
* Passed to the Components.Item custom component
*/
export type GridItemProps = Pick<React.ComponentProps<'div'>, 'style' | 'children' | 'className'> & {
'data-index': number
} & React.RefAttributes<HTMLDivElement>

/**
* Passed to the Components.Scroller custom component
*/
Expand Down Expand Up @@ -287,11 +294,6 @@ export interface GridItem<D> {
data?: D
}

export interface GridItemProps {
'data-index': number
className?: string
}

export interface GridComponents<Context = any> {
/**
* Set to customize the item wrapping element. Use only if you would like to render list from elements different than a `div`.
Expand Down

0 comments on commit 9372b9a

Please sign in to comment.