@mantine/core
Version:
React components library focused on usability, accessibility and developer experience
1 lines • 922 B
Source Map (JSON)
{"version":3,"file":"Pagination.context.cjs","names":["createSafeContext"],"sources":["../../../src/components/Pagination/Pagination.context.ts"],"sourcesContent":["import { createSafeContext, GetStylesApi } from '../../core';\nimport type { PaginationRootFactory } from './PaginationRoot/PaginationRoot';\n\nexport interface PaginationContextValue {\n total: number;\n range: (number | 'dots')[];\n active: number;\n disabled: boolean | undefined;\n getItemProps?: (page: number) => Record<string, any>;\n onChange: (page: number) => void;\n onNext: () => void;\n onPrevious: () => void;\n onFirst: () => void;\n onLast: () => void;\n getStyles: GetStylesApi<PaginationRootFactory>;\n}\n\nexport const [PaginationProvider, usePaginationContext] = createSafeContext<PaginationContextValue>(\n 'Pagination.Root component was not found in tree'\n);\n"],"mappings":";;AAiBA,MAAa,CAAC,oBAAoB,gGAAwBA,kBACxD,kDACD"}