1.2.3 • Published 12 months ago

easyfill v1.2.3

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
12 months ago

Easyfill

A simple React component for autofilling popular email suffixes.

Install

npm i easyfill

Usage

import Easyfill from 'easyfill';


function CoolReactComponent() {
    const handleAdd = (itemAdded) => {
        console.log(itemAdded);
    }

    const handleAdd = (allItemsAdded) => {
        console.log(allItemsAdded);
    }

    const handleValidation = (itemToValidate) => {
        if (itemToValidate.length > 5) {
            return true
        } else {
            return false
        }
    }

    return(
        <Easyfill
            max={10}
            onAdd={handleAdd}
            onComplete={handleComplete}
            validation={handleValidation}
            progress
        />
    )
}

API Reference

max

  max={count}
ParameterTypeDescription
countnumberMax entries to allow.

onChange

  onAdd={handleOnChange}
ParameterTypeDescription
handleOnChangefunctionFunction to call when validated items change.

onComplete

  onComplete={handleOnComplete}
ParameterTypeDescription
handleOnCompletefunctionFunction to call when validated item count reaches max.

validation

  validation={handleValidation}
ParameterTypeDescription
validationfunctionCustom validation function that takes the input to be added, and returns a boolean.

progress

  progress={showProgress}
ParameterTypeDescription
showProgressbooleanBoolean that will show/hide progress bar in bottom left.

Authors

1.2.3

12 months ago

1.2.2

12 months ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago

0.2.2

1 year ago

0.1.8

2 years ago

0.1.6

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.0.5

2 years ago