1.0.3 • Published 1 year ago

react-customizable-select v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

react-customizable-select

A Simple Customizable React Select Component

NPM JavaScript Style Guide

Install

npm install --save react-customizable-select

Necessary Props

options: string[] | object{abbreviation: string, name: string}
idName: string
setValue: (val: string) => void

Optionnal Props

customStyle:

const style = {
  fontSize: '24px',
  width: '200px',
  minWidth: '300px',
  color: '#000',
  menuMaxHeight: '250px',
  scrollBehavior: 'smooth',
  labelMargin: '1rem 0 10px 0',
  generalPadding: '8px 16px',
  buttonBorder: '1px solid grey',
  buttonBackground: '#ededed',
  optionsBorder: '1px solid grey',
  optionsBackground: '#fff',
  optionsItemHoverBgColor: 'blue',
  optionsItemColor: 'black',
  optionsItemHoverTxtColor: 'white',
  arrowColor: 'black',
  arrowSize: 10
}

icon:

  <i></i>
  or
  <img></img>
  or
  <svg></svg>

label: string
scrollable: boolean
searchTimer: number in ms
isReset: boolean (used to reset component to initial state)
baseOption: string (used to define the default appearing option)

License

MIT © Dullahan83