1.1.4 • Published 3 years ago

react-simple-picker v1.1.4

Weekly downloads
8
License
MIT
Repository
github
Last release
3 years ago

react-simple-picker

Scrollable number picker

See Demo Page

Installation

npm install react-simple-picker or yarn add react-simple-picker

Usage

<Picker maxCount={59} />

or You can set maximal and minimal number with custom mask and onChange event function

<Picker
  height={300}
  iconAdd={<div>+</div>}
  iconMinus={<div>-</div>}
  initCount={2019}
  minCount={1970}
  maxCount={2999}
  preloadCount={8}
  renderMask={Mask => <Mask className={styles.dateMask} />}
  onChange={number => console.log('year', number)}
/>

Picker

PropertiesTypeDefaultRequired?Description
classNameStringlayout's className
styleStyleSheetlayout's style
scrollerBackgroundHex Color
minCountNumber0
initCountNumberminCount
maxCountNumber
preloadCountNumber2
onChangeFunctionfiring while picker's value changing
heightNumberpicker's height
iconAddHTMLElementicon for adding button
iconMinusHTMLElementicon for subtracting button
renderMaskFunction(Mask) => \<Mask \/>provide Mask Component for customizing

Mask

PropertiesTypeDefaultRequired?Description
classNameStringlayout's className
styleStyleSheetlayout's style
1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago