Skip to content

Commit

Permalink
fix(pagination, collapse): missing type slot and slot props (#6677)
Browse files Browse the repository at this point in the history
* fix(Pagination,Collapse): missing type slot and slot props

Signed-off-by: Artea <[email protected]>

* fix: lint

Signed-off-by: Artea <[email protected]>

* fix: try node22

Signed-off-by: Artea <[email protected]>

* fix: node22 for test

* fix: lint style indent

Signed-off-by: Artea <[email protected]>

---------

Signed-off-by: Artea <[email protected]>
  • Loading branch information
Sepush authored Jan 4, 2025
1 parent 942de11 commit 9f539df
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

strategy:
matrix:
node-version: [18, 20]
node-version: [22]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
Expand All @@ -42,7 +42,7 @@ jobs:

strategy:
matrix:
node-version: [18, 20]
node-version: [22]
steps:
- uses: actions/checkout@v3

Expand Down
2 changes: 2 additions & 0 deletions src/collapse/src/Collapse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type { ExtractPublicPropTypes, MaybeArray } from '../../_utils'
import type {
CollapseArrowSlotProps,
CollapseItemHeaderExtraSlotProps,
CollapseItemHeaderSlotProps,
HeaderClickInfo,
OnItemHeaderClick,
OnItemHeaderClickImpl,
Expand Down Expand Up @@ -88,6 +89,7 @@ export type CollapseProps = ExtractPublicPropTypes<typeof collapseProps>
export interface CollapseSlots {
default?: () => VNode[]
arrow?: (props: CollapseArrowSlotProps) => VNode[]
header?: (props: CollapseItemHeaderSlotProps) => VNode[]
'header-extra'?: (props: CollapseItemHeaderExtraSlotProps) => VNode[]
}

Expand Down
3 changes: 2 additions & 1 deletion src/pagination/src/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import type { Size as SelectSize } from '../../select/src/interface'
import type { PaginationTheme } from '../styles'
import type {
PaginationInfo,
PaginationLabelInfo,
PaginationRenderLabel,
PaginationSizeOption,
RenderGoto,
Expand Down Expand Up @@ -129,7 +130,7 @@ export type PaginationProps = ExtractPublicPropTypes<typeof paginationProps>
export interface PaginationSlots {
default?: () => VNode[]
goto?: () => VNode[]
label?: () => VNode[]
label?: (props: PaginationLabelInfo) => VNode[]
next?: (props: PaginationInfo) => VNode
prev?: (props: PaginationInfo) => VNode
prefix?: (props: PaginationInfo) => VNode
Expand Down
2 changes: 2 additions & 0 deletions src/pagination/src/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ export type PaginationRenderLabel = (
active: boolean
}
) => VNodeChild

export type PaginationLabelInfo = Parameters<PaginationRenderLabel>[0]

0 comments on commit 9f539df

Please sign in to comment.