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    
ui-component-library / src / components / molecules / SelectDropDown / Option / _circularRenderProp.tsx
Size: Mime:
// lib
import React from 'react'
import { isObj, EMPTY_OBJ } from 'exotic'
// local
import { SelectText } from './_styled'
import { Option } from './Option'
import { OptionProps, OptionState, OptionType } from './typings'
import { SelectProps } from '../typings'
import { SelectableState } from 'src/state/SelectionState'

export function renderItem(item: OptionType, props: SelectProps, state: SelectableState) {
  const onClick = item.onClick
  console.debug('[Option] renderItem')
  console.dir(item)
  console.log('[Component] Options circularRenderProps', item, props)
  return Option.from({ ...item, onClick }, {...props, label: item.label, value: item.label})
}