0.2.0 • Published 8 months ago

react-alphabet-list v0.2.0

Weekly downloads
63
License
-
Repository
-
Last release
8 months ago

React-Alphabet-List(in-Dev)

NPM

Preview

¶Demo

Alphabet-List-Demo On CodeSandBox

¶Props

PropsTypeDescription
data (required)ArrayAn array of strings or objects. When it's an array of object, specify the name key of item in nameKey
nameKeyStringA string that tells the name key of one item, undefined if data is string array
styleObjectA style object. Styles for the container
alphabetListStyleObjectA style object. Styles for the container of the alphabet list navigation on the right.
alphabetItemStyleObjectA style object. Styles for each alphabet in the alphabet list navigation
generateFn (required)FunctionA function that takes each item sent in the data array and returns the html to display

¶Usage

const data = ["anything"];

if array of object is to be used

const data = [{ name: "anything" }];
const nameKey = "name";
<AlphabetList
  data={data}
  nameKey={nameKey}
  style={{}}
  alphabetListStyle={{}}
  alphabetItemStyle={{}}
  generateFn={(item, index) => {
    return <div key={item}>{item}</div>;
  }}
/>

This Project is Under The MIT License

0.2.0

8 months ago

0.1.8

5 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago