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 / organisms / Share / typings.ts
Size: Mime:
import { ReactNode } from 'react'
import { InformationProps } from 'molecules/SocialIconList'
import { EventHandlerArg } from 'typings/generic'

/**
 * Item Props OnClick Event with Function
 */
export type ItemOnClickArgs = EventHandlerArg<ItemProps>
export interface ItemPropsOnClick extends Function {
  (args: ItemOnClickArgs): void
}

/**
 * Item Props
 */
export interface ItemProps {
  label?: string
  url?: string
  path?: string
  bgcolor?: string
  color?: string
  onClick?: ItemPropsOnClick
}

/**
 * Share Props OnClick Event with Function
 */
export type SharePropsOnClickArgs = EventHandlerArg<ShareProps>
export interface SharePropsOnClick extends Function {
  (args: SharePropsOnClickArgs): void
}

/**
 * share props renderProp function
 */
export interface ShareRenderProp extends Function {
  (props: ShareProps): ReactNode
}

export interface ShareProps {
  className?: string
  children?: ReactNode
  list: Array<ItemProps>

  /**
   * Render Props
   */
  renderWrapper?: ShareRenderProp
  renderHeaderView?: ShareRenderProp
  renderListView?: ShareRenderProp

  /**
   * Social Share Product Name
   */
  productName?: string
  label?: string

  /**
   * Handler Onclick Fucntion For User
   */
  onClick?: SharePropsOnClick
}