Skip to content

Commit

Permalink
fix(Pagination,Collapse): missing type slot and slot props
Browse files Browse the repository at this point in the history
Signed-off-by: Artea <sepush@outlook.com>
  • Loading branch information
Sepush committed Jan 4, 2025
1 parent 942de11 commit 8777ad0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
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
23 changes: 12 additions & 11 deletions 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 Expand Up @@ -515,16 +516,16 @@ export default defineComponent({
})
const themeClassHandle = inlineThemeDisabled
? useThemeClass(
'pagination',
computed(() => {
let hash = ''
const { size } = props
hash += size[0]
return hash
}),
cssVarsRef,
props
)
'pagination',

Check failure on line 519 in src/pagination/src/Pagination.tsx

View workflow job for this annotation

GitHub Actions / lint (18)

Expected indentation of 10 spaces but found 8

Check failure on line 519 in src/pagination/src/Pagination.tsx

View workflow job for this annotation

GitHub Actions / lint (20)

Expected indentation of 10 spaces but found 8
computed(() => {

Check failure on line 520 in src/pagination/src/Pagination.tsx

View workflow job for this annotation

GitHub Actions / lint (18)

Expected indentation of 10 spaces but found 8

Check failure on line 520 in src/pagination/src/Pagination.tsx

View workflow job for this annotation

GitHub Actions / lint (20)

Expected indentation of 10 spaces but found 8
let hash = ''

Check failure on line 521 in src/pagination/src/Pagination.tsx

View workflow job for this annotation

GitHub Actions / lint (18)

Expected indentation of 12 spaces but found 10

Check failure on line 521 in src/pagination/src/Pagination.tsx

View workflow job for this annotation

GitHub Actions / lint (20)

Expected indentation of 12 spaces but found 10
const { size } = props

Check failure on line 522 in src/pagination/src/Pagination.tsx

View workflow job for this annotation

GitHub Actions / lint (18)

Expected indentation of 12 spaces but found 10

Check failure on line 522 in src/pagination/src/Pagination.tsx

View workflow job for this annotation

GitHub Actions / lint (20)

Expected indentation of 12 spaces but found 10
hash += size[0]

Check failure on line 523 in src/pagination/src/Pagination.tsx

View workflow job for this annotation

GitHub Actions / lint (18)

Expected indentation of 12 spaces but found 10

Check failure on line 523 in src/pagination/src/Pagination.tsx

View workflow job for this annotation

GitHub Actions / lint (20)

Expected indentation of 12 spaces but found 10
return hash

Check failure on line 524 in src/pagination/src/Pagination.tsx

View workflow job for this annotation

GitHub Actions / lint (18)

Expected indentation of 12 spaces but found 10

Check failure on line 524 in src/pagination/src/Pagination.tsx

View workflow job for this annotation

GitHub Actions / lint (20)

Expected indentation of 12 spaces but found 10
}),

Check failure on line 525 in src/pagination/src/Pagination.tsx

View workflow job for this annotation

GitHub Actions / lint (18)

Expected indentation of 10 spaces but found 8

Check failure on line 525 in src/pagination/src/Pagination.tsx

View workflow job for this annotation

GitHub Actions / lint (20)

Expected indentation of 10 spaces but found 8
cssVarsRef,

Check failure on line 526 in src/pagination/src/Pagination.tsx

View workflow job for this annotation

GitHub Actions / lint (18)

Expected indentation of 10 spaces but found 8

Check failure on line 526 in src/pagination/src/Pagination.tsx

View workflow job for this annotation

GitHub Actions / lint (20)

Expected indentation of 10 spaces but found 8
props

Check failure on line 527 in src/pagination/src/Pagination.tsx

View workflow job for this annotation

GitHub Actions / lint (18)

Expected indentation of 10 spaces but found 8

Check failure on line 527 in src/pagination/src/Pagination.tsx

View workflow job for this annotation

GitHub Actions / lint (20)

Expected indentation of 10 spaces but found 8
)

Check failure on line 528 in src/pagination/src/Pagination.tsx

View workflow job for this annotation

GitHub Actions / lint (18)

Expected indentation of 8 spaces but found 6

Check failure on line 528 in src/pagination/src/Pagination.tsx

View workflow job for this annotation

GitHub Actions / lint (20)

Expected indentation of 8 spaces but found 6
: undefined
return {
rtlEnabled: rtlEnabledRef,
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 8777ad0

Please sign in to comment.