1.2.3 • Published 3 years ago

select-library v1.2.3

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

SelectMenuLibrary

Run Locally

  • run nvm use to get the correct node version
  • run yarn to get dependecies
  • yarn storybook to see different use cases
  • yarn test to run test cases
  • use examples from side menu to see different versions

Usage

There is already a published version on npm, if you want to add your own you can follow below setps

  • Using published. version
  • change the package name in package.json
  • Run yarn build
  • Run yarn publish
  • use your npm credentials to upload the package

  • add to your project with yarn add ad-test-select

  • use as import { Select } from 'ad-test-select'

<Select {...propsHere}/>

  • to test local version without publising
      • cd atlas-ds-challenge
      • yarn build
      • yarn link
      • cd node_modules/react
      • yarn link
      • cd ../../node_modules/react-dom
      • yarn link
      • cd YOUR_PROJECT
      • yarn link atlas-ds-challenge
      • yarn link react
      • yarn link react-dom

import { Select } from 'ad-test-select'

<Select {...propsHere}/>

Props

Typescript types are exported, below is the list of props for reference

SyntaxDescriptionRequired
menuOptionsmenu options for selecttrue
searchableboolean (enable search)false
searchPlaceHolderstring (place holder for search)false
onChangefunctiontrue
selectedpreselcted valuefalse
renderOptionextended function to provide custom menu itemsfalse
isMenuOpenbooleanfalse
searchPlaceHolderstringfalse
dropDownlabelstringfalse
  selected = {
    value: string;
    label?: string; (not required)
  };
1.2.0

3 years ago

1.1.9

3 years ago

1.2.3

3 years ago

1.2.1

3 years ago

1.1.8

3 years ago