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    
@skava/ui / src / components / molecules / List / typings.ts
Size: Mime:
import { ReactNode } from 'react'

/**
 * TYPES
 */
export type ListValueProps = Array<ItemProps>

/**
 * FUNCTIONS
 */
export interface ItemRenderProp {
  (item: ItemProps, props?: ListProps): ReactNode
}

export interface ListRenderProp {
  (props: ListProps): ReactNode
}

/**
 * ITEM PROPS
 */

export interface ItemProps {
  label: string
  value?: string
}

/**
 * LIST PROPS
 */
export interface ListProps {
  // used to set className of the wrapper
  className?: ''

  // uses fixtures file to render the data
  list: ListValueProps

  // where we storing the component children
  children?: ReactNode

  /**
   * To display in horizontal view
   */
  isHorizontalView?: boolean
  /**
   * Render Props
   */
  renderItem?: ItemRenderProp
  renderList?: ListRenderProp
  renderWrapper?: ListRenderProp
}