Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
import { ReactNode } from 'react'
// import { OnSelectChange } from 'molecules/SelectDropDown/typings'

// export interface PaginationHandler {
//   (props: PaginationProps, state: PaginationState): void
// }

/** FUNCTION */
export interface PaginationRenderProp {
  // @todo should return SelectDropDown only
  (props: PaginationProps, state: PaginationState): ReactNode
}

export interface PaginationProps {
  // used to set the class name of the wrapper
  className?: ''
  pageCountInformation?: ''

  /**
   * @todo @name list SAME
   * @todo needs to be inherited this typings from SelectDropDown
   */
  pageNumberList?: Array<Object>

  // where we used to store and pass the children to the wrapper
  children?: ReactNode

  paginationLimit: number
  defaultIndex: number

  /**
   * renderProps
   */
  renderWrapper?: PaginationRenderProp
  renderDropDown?: PaginationRenderProp
  renderPaginationWithArrows?: PaginationRenderProp
  renderLeftButton?: PaginationRenderProp
  renderPaginationInput?: PaginationRenderProp
  renderRightButton?: PaginationRenderProp
  onDecrement?: PaginationRenderProp
  onIncrement?: PaginationRenderProp

  state?: PaginationState

  onDropdownChange?: Function
  onPaginationInputChange?: Function
  onPaginationInputBlur?: Function
}

export interface PaginationState {
  count: number
  shouldDisableLeftIcon: boolean
  shouldDisableRightIcon: boolean

  decrementCount(): void
  incrementCount(limit: number): void
  setCount(value: number): void
  disableIcon(direction?: string): void
  enableIcon(direction?: string): void
}