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 / stories / molecules / ProductOptions / ProductOptions.story.tsx
Size: Mime:
import React from 'react'
import { storiesOf } from '@storybook/react'
import { ProductOptions } from 'molecules/ProductOptions'
import { productOptionsData as data } from './fixture'

const handleOnClick = () => {
  console.log('Product Options Story: handleOnClick')
}

storiesOf('molecules/ProductOptions', module)
  .add('PDP View', () => (
    <React.Fragment>
      <ProductOptions
        list={data.color}
        type={'color'}
        onChange={handleOnClick}
      />
      <ProductOptions
        list={data.size1}
        type={'size1'}
        onChange={handleOnClick}
      />
      <ProductOptions
        list={data.style}
        type={'style'}
        onChange={handleOnClick}
      />
    </React.Fragment>
  ))
  .add('PLP View', () => (
    <React.Fragment>
      <ProductOptions
        list={data.color}
        isDropdown={true}
        onChange={handleOnClick}
      />
      <ProductOptions
        list={data.size1}
        isDropdown={true}
        onChange={handleOnClick}
      />
      <ProductOptions
        list={data.style}
        isDropdown={true}
        onChange={handleOnClick}
      />
    </React.Fragment>
  ))