Learn more  » Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

skava / @skava/ui   js

Repository URL to install this package:

Version: 4.2.0-a11y.0 

/ src / components / molecules / DragAndDrop / ProductListFilter / ProductListFilter.tsx

import * as React from 'react'
import { observer } from 'xmobx/mobx-react'
import { DraggableState } from '../state'
import { ProductListFilterProps } from './typings'
import { ProductListFilterContainer } from './styled'
import { defaultRenderOption } from './renderProps'

@observer
export class ProductListFilter extends React.Component<ProductListFilterProps> {
  observableState = this.props.state || new DraggableState()
  static defaultProps = {
    className: '',
    renderOptions: defaultRenderOption,
  }
  render() {
    const { renderOptions, ...remainingProps } = this.props
    const listView = renderOptions(remainingProps, this.observableState)
    return <ProductListFilterContainer>{listView}</ProductListFilterContainer>
  }
}